summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 12:37:29 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 12:49:20 +0100
commitfb5af2c54f2a27c1154d64fe4d111003ce5fcb03 (patch)
tree049d6f7c7a3006390b6a8afbc6926948d85b467c /Makefile
parent19aa428a6c72a8cc525898f5b855d5389da03870 (diff)
downloadmgaonline-fb5af2c54f2a27c1154d64fe4d111003ce5fcb03.tar
mgaonline-fb5af2c54f2a27c1154d64fe4d111003ce5fcb03.tar.gz
mgaonline-fb5af2c54f2a27c1154d64fe4d111003ce5fcb03.tar.bz2
mgaonline-fb5af2c54f2a27c1154d64fe4d111003ce5fcb03.tar.xz
mgaonline-fb5af2c54f2a27c1154d64fe4d111003ce5fcb03.zip
Enhancement Makefile and add support for DESTDIR
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index d5cdc508..b7b36616 100644
--- a/Makefile
+++ b/Makefile
@@ -5,18 +5,19 @@ MGAUPDATE = mgaupdate
MGAAPPLET = mgaapplet
SUBDIRS = po polkit
-PREFIX = /
-DATADIR = $(PREFIX)/usr/share
+DESTDIR =
+PREFIX = $(DESTDIR)/usr
+BINDIR = $(PREFIX)/bin
+DATADIR = $(PREFIX)/share
ICONSDIR = $(DATADIR)/icons
-LIBEXECDIR = $(PREFIX)/usr/libexec
-BINDIR = $(PREFIX)/usr/bin
-FBLIBDIR = $(PREFIX)/usr/lib/libDrakX/drakfirsttime
-SYSCONFDIR = $(PREFIX)/etc/sysconfig
+LOCALEDIR = $(DATADIR)/locale
+LIBEXECDIR = $(PREFIX)/libexec
+FBLIBDIR = $(PREFIX)/lib/libDrakX/drakfirsttime
+SYSCONFDIR = $(DESTDIR)/etc/sysconfig
SBINREL = ../sbin
-localedir = $(PREFIX)/usr/share/locale
-override CFLAGS += -DPACKAGE=\"$(NAME)\" -DLOCALEDIR=\"$(localedir)\"
+override CFLAGS += -DPACKAGE=\"$(NAME)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
all:
(find -name '*.pm' -o -name mgaapplet\* -o -name mgaupdate -o -name mgaonline_agent.pl -type f) | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
@@ -29,7 +30,7 @@ clean:
find . -name '*~' | xargs rm -f
install: all
- install -d $(PREFIX)/usr/{bin,libexec,share/{mime/packages,autostart,gnome/autostart,icons},lib/libDrakX/drakfirsttime}
+ install -d $(PREFIX)/{bin,libexec,share/{mime/packages,autostart,gnome/autostart,icons},lib/libDrakX/drakfirsttime}
install -m755 $(MGAUPDATE) $(MGAAPPLET)-config $(MGAAPPLET)-upgrade-helper $(LIBEXECDIR)
install -m755 $(MGAAPPLET) $(MGAAPPLET)-update-checker $(BINDIR)
install -d $(SYSCONFDIR)