manjaro-architect/Makefile

105 lines
2.9 KiB
Makefile
Raw Normal View History

2017-03-11 10:22:51 +00:00
Version=0.8.0
2017-02-17 05:17:31 +00:00
PREFIX = /usr
LIBDIR = /lib/manjaro-architect
DATADIR = /share/manjaro-architect
BIN = \
bin/btrfs-subvol-functions \
bin/check-translate.in \
2017-02-17 05:17:31 +00:00
bin/ma-launcher \
bin/manjaro-architect
2017-02-17 05:17:31 +00:00
LIBS = \
lib/util.sh \
2017-03-04 20:14:55 +00:00
lib/util-advanced.sh \
2017-02-17 05:17:31 +00:00
lib/util-base.sh \
lib/util-desktop.sh \
lib/util-disk.sh \
2017-03-04 20:14:55 +00:00
lib/util-menu.sh
2017-02-17 05:17:31 +00:00
LISTS = \
2017-02-17 22:55:20 +00:00
data/package-lists/base-openrc-manjaro \
data/package-lists/base-systemd-manjaro \
data/package-lists/input-drivers
2017-02-17 05:17:31 +00:00
LANG = \
data/translations/danish.trans \
data/translations/dutch.trans \
data/translations/english.trans \
data/translations/french.trans \
data/translations/german.trans \
data/translations/hungarian.trans \
data/translations/italian.trans \
data/translations/portuguese.trans \
data/translations/portuguese_brasil.trans \
data/translations/russian.trans \
data/translations/spanish.trans
ICONS = \
data/manjaro-architect.png
LAUNCHER = \
data/manjaro-architect.desktop
LIVE = \
data/ma-launcher.desktop
all: $(BIN)
edit = \
sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)$(DATADIR)|g" \
-e "s|@libdir[@]|$(DESTDIR)$(PREFIX)$(LIBDIR)|g" \
2017-02-18 00:53:03 +00:00
-e "s|@version@|${Version}|"
2017-02-17 05:17:31 +00:00
%: %.in Makefile
@echo "GEN $@"
@$(RM) "$@"
@m4 -P $@.in | $(edit) >$@
@chmod a-w "$@"
@chmod +x "$@"
clean:
rm -f $(BIN)
install:
install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin
2017-02-18 00:56:48 +00:00
install -dm0755 $(DESTDIR)$(PREFIX)$(LIBDIR)
2017-02-17 05:17:31 +00:00
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)$(LIBDIR)
2017-02-18 00:56:48 +00:00
install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
2017-02-18 00:53:03 +00:00
install -m0644 ${LISTS} $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
2017-02-17 05:17:31 +00:00
2017-02-18 00:56:48 +00:00
install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/translations
2017-02-18 00:53:03 +00:00
install -m0644 ${LANG} $(DESTDIR)$(PREFIX)$(DATADIR)/translations
2017-02-17 05:17:31 +00:00
2017-02-17 22:58:50 +00:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
2017-02-17 05:17:31 +00:00
install -m0644 ${ICONS} $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
install -dm0755 $(DESTDIR)$(PREFIX)/share/applications
install -m0644 ${LAUNCHER} $(DESTDIR)$(PREFIX)/share/applications
install -dm0755 $(DESTDIR)/etc/skel/.config/autostart
install -m0644 ${LIVE} $(DESTDIR)/etc/skel/.config/autostart
uninstall:
for f in ${BIN}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
2017-02-18 00:53:03 +00:00
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)$(LIBDIR)/$$f; done
for f in ${LISTS}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists/$$f; done
for f in ${LANG}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/translations/$$f; done
for f in ${ICONS}; do rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/$$f; done
2017-02-17 22:53:04 +00:00
for f in ${LAUNCHER}; do rm -f $(DESTDIR)$(PREFIX)/share/applications/$$f; done
2017-02-18 00:53:03 +00:00
for f in ${LIVE}; do rm -f $(DESTDIR)/etc/skel/.config/autostart/$$f; done
2017-02-17 05:17:31 +00:00
install: install
uninstall: uninstall
dist:
git archive --format=tar --prefix=manjaro-architect-$(Version)/ $(Version) | gzip -9 > manjaro-architect-$(Version).tar.gz
gpg --detach-sign --use-agent manjaro-architect-$(Version).tar.gz
.PHONY: all clean install uninstall dist