summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-06-24 21:55:37 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-06-24 21:55:37 +0100
commitf7e54cc8a29e5fa319ce21d6ec268e210397740a (patch)
tree5078d7a5f7f2393aa3b5068d980b0d3598bff878 /Makefile
parent2faa4c83dbaca3958feb092c9776f016a0133e8f (diff)
write a proper Makefile, rearrange source code a bit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5d2c1e1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,54 @@
+SUBDIRS =
+DESTDIR =
+UBINDIR ?= /usr/bin
+DESKTOPDIR ?= /usr/share/applications
+PIXMAPDIR ?= /usr/share/pixmaps
+SISYPHUSDATADIR ?= /usr/share/sisyphus
+SISYPHUSSHLIBDIR ?= /usr/lib64/sisyphus
+SISYPHUSPYLIBDIR ?= /usr/lib64/python3.4
+POLKITDIR ?= /usr/share/polkit-1/actions
+
+all:
+ for d in $(SUBDIRS); do $(MAKE) -C $$d; done
+
+clean:
+ for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
+
+install:
+ for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
+
+ install -d $(DESTDIR)$(UBINDIR)
+ install -m 0755 sisyphus-gui $(DESTDIR)$(UBINDIR)/
+ install -m 0755 sisyphus-gui-pkexec $(DESTDIR)$(UBINDIR)/
+ install -m 0755 src/frontend/cli/sisyphus-cli.sh $(DESTDIR)$(UBINDIR)/
+ install -m 0755 src/frontend/cli/sisyphus-cli.py $(DESTDIR)$(UBINDIR)/
+ install -d $(DESTDIR)$(SISYPHUSSHLIBDIR)
+ install -m 0644 src/backend/libsisyphus.sh $(DESTDIR)$(SISYPHUSSHLIBDIR)/
+ install -d $(DESTDIR)$(SISYPHUSPYLIBDIR)
+ install -m 0644 src/backend/libsisyphus.py $(DESTDIR)$(SISYPHUSPYLIBDIR)/
+ install -d $(DESTDIR)$(SISYPHUSDATADIR)
+ install -d $(DESTDIR)$(SISYPHUSDATADIR)/helpers
+ install -d $(DESTDIR)$(SISYPHUSDATADIR)/icon
+ install -d $(DESTDIR)$(SISYPHUSDATADIR)/ui
+ install -m 0755 src/helpers/* $(DESTDIR)$(SISYPHUSDATADIR)/helpers/
+ install -m 0755 src/frontend/gui/*.py $(DESTDIR)$(SISYPHUSDATADIR)/
+ install -m 0755 src/frontend/gui/icon/* $(DESTDIR)$(SISYPHUSDATADIR)/icon/
+ install -m 0755 src/frontend/gui/ui/* $(DESTDIR)$(SISYPHUSDATADIR)/ui/
+ install -d $(DESTDIR)$(DESKTOPDIR)
+ install -m 0755 sisyphus-gui.desktop $(DESTDIR)$(DESKTOPDIR)/
+ install -d $(DESTDIR)$(PIXMAPDIR)
+ install -m 0644 sisyphus-gui.png $(DESTDIR)$(PIXMAPDIR)
+ install -d $(DESTDIR)$(POLKITDIR)
+ install -m 0644 org.redcorelinux.sisyphus-gui.policy $(DESTDIR)$(POLKITDIR)/
+
+uninstall:
+ rm -rf $(DESTDIR)$(UBINDIR)/sisyphus-cli.sh
+ rm -rf $(DESTDIR)$(UBINDIR)/sisyphus-cli.py
+ rm -rf $(DESTDIR)$(UBINDIR)/sisyphus-gui
+ rm -rf $(DESTDIR)$(UBINDIR)/sisyphus-gui-pkexec
+ rm -rf $(DESTDIR)$(DESKTOPDIR)/sisyphus-gui.desktop
+ rm -rf $(DESTDIR)$(PIXMAPDIR)/sisyphus-gui.png
+ rm -rf $(DESTDIR)$(POLKITDIR)/org.redcorelinux.sisyphus-gui.policy
+ rm -rf $(DESTDIR)$(SISYPHUSDATADIR)
+ rm -rf $(DESTDIR)$(SISYPHUSSHLIBDIR)
+ rm -rf $(DESTDIR)$(SISYPHUSPYLIBDIR)/libsisyphus.py