forked from aszeszo/time-slider
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
151 lines (143 loc) · 7.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
include VERSION
mkinstalldirs = /usr/bin/mkdir -p
INSTALL = /usr/sbin/install
INSTALL_DATA = ${INSTALL} -u root -g bin -m 644 -f
INSTALL_PROGRAM = ${INSTALL} -u root -g bin -f
INSTALL_SCRIPT = ${INSTALL} -f
RM = /usr/bin/rm -f
RMRF = /usr/bin/rm -Rf
RMDIR = /usr/bin/rmdir
# Use python 2.7 if PYTHON environent is not set
ifeq ($(strip $(PYTHON)),)
PYTHON = /usr/bin/python2.7
endif
SUBDIRS = po data
DISTFILES = Authors \
VERSION \
ChangeLog \
Makefile \
py-compile.py \
$(SUBDIRS) \
lib \
usr \
etc
clean:
$(RM) usr/share/time-slider/lib/time_slider/*.pyc
$(RM) usr/share/time-slider/lib/plugin/*.pyc
$(RM) usr/share/time-slider/lib/plugin/rsync/*.pyc
$(RM) usr/share/time-slider/lib/plugin/zfssend/*.pyc
all:
for subdir in $(SUBDIRS); do \
cd $$subdir; make; cd ..;\
done
echo $(VERSION)
dist: clean all
$(RMRF) time-slider-$(VERSION)
mkdir time-slider-$(VERSION)
cp -pR $(DISTFILES) time-slider-$(VERSION)
/usr/bin/tar cf - time-slider-$(VERSION) | bzip2 > time-slider-$(VERSION).tar.bz2
$(RMRF) time-slider-$(VERSION)
install:
for subdir in $(SUBDIRS); do \
cd $$subdir; \
make DESTDIR=$(DESTDIR) GETTEXT_PACKAGE=time-slider install; \
cd ..;\
done
$(mkinstalldirs) $(DESTDIR)/etc/dbus-1/system.d
$(INSTALL_DATA) $(DESTDIR)/etc/dbus-1/system.d etc/dbus-1/system.d/time-slider.conf
$(mkinstalldirs) $(DESTDIR)/etc/xdg/autostart
$(INSTALL_DATA) $(DESTDIR)/etc/xdg/autostart etc/xdg/autostart/*.desktop
$(mkinstalldirs) $(DESTDIR)/lib/svc/method
$(INSTALL_SCRIPT) $(DESTDIR)/lib/svc/method lib/svc/method/time-slider
$(INSTALL_SCRIPT) $(DESTDIR)/lib/svc/method lib/svc/method/time-slider-plugin
$(INSTALL_SCRIPT) $(DESTDIR)/lib/svc/method lib/svc/method/time-slider-rsync
$(mkinstalldirs) $(DESTDIR)/usr/bin
$(INSTALL_PROGRAM) $(DESTDIR)/usr/bin usr/bin/time-slider-setup
$(mkinstalldirs) $(DESTDIR)/usr/lib/time-slider/plugins/rsync
$(mkinstalldirs) $(DESTDIR)/usr/lib/time-slider/plugins/zfssend
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib usr/lib/time-sliderd
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib usr/lib/time-slider-delete
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib usr/lib/time-slider-notify
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib usr/lib/time-slider-snapshot
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib usr/lib/time-slider-version
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib/time-slider/plugins/zfssend usr/lib/time-slider/plugins/zfssend/zfssend
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib/time-slider/plugins/rsync usr/lib/time-slider/plugins/rsync/rsync-trigger
$(INSTALL_PROGRAM) $(DESTDIR)/usr/lib/time-slider/plugins/rsync usr/lib/time-slider/plugins/rsync/rsync-backup
$(mkinstalldirs) $(DESTDIR)/usr/share/applications
$(INSTALL_DATA) $(DESTDIR)/usr/share/applications usr/share/applications/time-slider.desktop
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/16x16/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/16x16/apps usr/share/icons/hicolor/16x16/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/24x24/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/24x24/apps usr/share/icons/hicolor/24x24/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps usr/share/icons/hicolor/32x32/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/36x36/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/36x36/apps usr/share/icons/hicolor/36x36/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/48x48/apps usr/share/icons/hicolor/48x48/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/72x72/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/72x72/apps usr/share/icons/hicolor/72x72/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/icons/hicolor/96x96/apps
$(INSTALL_DATA) $(DESTDIR)/usr/share/icons/hicolor/96x96/apps usr/share/icons/hicolor/96x96/apps/time-slider-setup.png
$(mkinstalldirs) $(DESTDIR)/usr/share/time-slider/glade
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/glade usr/share/time-slider/glade/time-slider-delete.glade
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/glade usr/share/time-slider/glade/time-slider-setup.glade
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/glade usr/share/time-slider/glade/time-slider-snapshot.glade
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/glade usr/share/time-slider/glade/time-slider-version.glade
$(mkinstalldirs) $(DESTDIR)/usr/share/time-slider/lib/time_slider
for file in usr/share/time-slider/lib/time_slider/*.py; do \
if test -f $$file ; then \
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/lib/time_slider $$file; \
fi; \
done
$(mkinstalldirs) $(DESTDIR)/usr/share/time-slider/lib/plugin
for file in usr/share/time-slider/lib/plugin/*.py; do \
if test -f $$file ; then \
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/lib/plugin $$file; \
fi; \
done
$(mkinstalldirs) $(DESTDIR)/usr/share/time-slider/lib/plugin/rsync
for file in usr/share/time-slider/lib/plugin/rsync/*.py; do \
if test -f $$file ; then \
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/lib/plugin/rsync $$file; \
fi; \
done
$(mkinstalldirs) $(DESTDIR)/usr/share/time-slider/lib/plugin/zfssend
for file in usr/share/time-slider/lib/plugin/zfssend/*.py; do \
if test -f $$file ; then \
$(INSTALL_DATA) $(DESTDIR)/usr/share/time-slider/lib/plugin/zfssend $$file; \
fi; \
done
$(mkinstalldirs) $(DESTDIR)/lib/svc/manifest/application
$(INSTALL_DATA) $(DESTDIR)/lib/svc/manifest/application lib/svc/manifest/application/time-slider.xml
$(INSTALL_DATA) $(DESTDIR)/lib/svc/manifest/application lib/svc/manifest/application/time-slider-plugin.xml
$(mkinstalldirs) $(DESTDIR)/lib/svc/manifest/system/filesystem
$(INSTALL_DATA) $(DESTDIR)/lib/svc/manifest/system/filesystem lib/svc/manifest/system/filesystem/auto-snapshot.xml
$(PYTHON) py-compile.py
uninstall:
for subdir in $(SUBDIRS); do \
cd $$subdir; \
make DESTDIR=$(DESTDIR) GETTEXT_PACKAGE=time-slider uninstall; \
cd ..;\
done
$(RM) $(DESTDIR)/etc/dbus-1/system.d/time-slider.conf
$(RM) $(DESTDIR)/etc/xdg/autostart/time-slider-notify.desktop
$(RM) $(DESTDIR)/lib/svc/method/time-slider
$(RM) $(DESTDIR)/lib/svc/method/time-slider-plugin
$(RM) $(DESTDIR)/lib/svc/method/time-slider-rsync
$(RM) $(DESTDIR)/usr/bin/time-slider-setup
$(RM) $(DESTDIR)/usr/lib/time-sliderd
$(RM) $(DESTDIR)/usr/lib/time-slider-delete
$(RM) $(DESTDIR)/usr/lib/time-slider-notify
$(RM) $(DESTDIR)/usr/lib/time-slider-snapshot
$(RM) $(DESTDIR)/usr/lib/time-slider-version
$(RM) $(DESTDIR)/usr/lib/time-slider-zfssend
$(RM) $(DESTDIR)/usr/lib/time-slider-rsync
$(RMRF) $(DESTDIR)/usr/lib/time-slider/plugins/rsync
$(RMRF) $(DESTDIR)/usr/lib/time-slider/plugins/zfssend
$(RM) $(DESTDIR)/usr/share/applications/time-slider.desktop
$(RM) $(DESTDIR)/usr/share/icons/hicolor/*/apps/time-slider-setup.png
$(RMRF) $(DESTDIR)/usr/share/time-slider
$(RM) $(DESTDIR)/lib/svc/manifest/application/time-slider.xml
$(RM) $(DESTDIR)/lib/svc/manifest/application/time-slider-plugin.xml
$(RM) $(DESTDIR)/lib/svc/manifest/system/filesystem/auto-snapshot.xml