-
Notifications
You must be signed in to change notification settings - Fork 46
/
Makefile.am
107 lines (75 loc) · 3.09 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS =
light_guid = 52c2877e-44e1-11e5-8874-a62d1d5d46B0
darker_guid = 8a01dfcc-450f-11e5-909b-fb581d5d46b0
dark_guid = 03cb16aa-4675-11e5-b233-213b1d5d46b0
lighttempdir = $(top_builddir)/arc-firefox-theme-light
darkertempdir = $(top_builddir)/arc-firefox-theme-darker
darktempdir = $(top_builddir)/arc-firefox-theme-darker
extensiondir = $(DESTDIR)/$(libdir)/firefox/browser/extensions
EXTRA_DIST = ${top_srcdir}/README.md \
${top_srcdir}/LICENSE \
${top_srcdir}/arc-firefox-theme \
$(top_srcdir)/autogen.sh
NULL =
mkxpi:
if ENABLE_LIGHT
cp -R $(top_srcdir)/arc-firefox-theme $(lighttempdir)
cp $(lighttempdir)/chrome/browser/sass/browser-light.css $(lighttempdir)/chrome/browser/browser.css
rm -rf $(lighttempdir)/chrome/browser/sass
rm $(lighttempdir)/chrome/overrides.sh
cd $(lighttempdir) && \
/usr/bin/zip -FS -r ../arc-firefox-theme-$(VERSION).xpi *
rm -rf $(lighttempdir)
endif # ENABLE_LIGHT
if ENABLE_DARKER
cp -R $(top_srcdir)/arc-firefox-theme $(darkertempdir)
cp $(darkertempdir)/chrome/browser/sass/browser-darker.css $(darkertempdir)/chrome/browser/browser.css
rm -rf $(darkertempdir)/chrome/browser/sass
rm $(darkertempdir)/chrome/overrides.sh
sed -i 's/arc-theme/arc-darker-theme/' $(darkertempdir)/chrome.manifest
sed -i 's/arc-theme/arc-darker-theme/' $(darkertempdir)/install.rdf
sed -i 's/Arc /Arc Darker /' $(darkertempdir)/install.rdf
sed -i "s/$(light_guid)/$(darker_guid)/" $(darkertempdir)/install.rdf
cd $(darkertempdir) && \
/usr/bin/zip -FS -r ../arc-darker-firefox-theme-$(VERSION).xpi *
rm -rf $(darkertempdir)
endif # ENABLE_LIGHT
if ENABLE_DARK
cp -R $(top_srcdir)/arc-firefox-theme $(darktempdir)
cp $(darktempdir)/chrome/browser/sass/browser-dark.css $(darktempdir)/chrome/browser/browser.css
rm -rf $(darktempdir)/chrome/browser/sass
rm $(darktempdir)/chrome/overrides.sh
sed -i 's/arc-theme/arc-dark-theme/' $(darktempdir)/chrome.manifest
sed -i 's/arc-theme/arc-dark-theme/' $(darktempdir)/install.rdf
sed -i 's/Arc /Arc Dark /' $(darktempdir)/install.rdf
sed -i "s/$(light_guid)/$(dark_guid)/" $(darktempdir)/install.rdf
cd $(darktempdir) && \
/usr/bin/zip -FS -r ../arc-dark-firefox-theme-$(VERSION).xpi *
rm -rf $(darktempdir)
endif # ENABLE_DARK
install-data-local: mkxpi
$(MKDIR_P) $(extensiondir)
if ENABLE_LIGHT
/usr/bin/unzip -d $(extensiondir)/\{$(light_guid)\} $(top_builddir)/arc-firefox-theme-$(VERSION).xpi
endif # ENABLE_LIGHT
if ENABLE_DARKER
/usr/bin/unzip -d $(extensiondir)/\{$(darker_guid)\} $(top_builddir)/arc-darker-firefox-theme-$(VERSION).xpi
endif # ENABLE_LIGHT
if ENABLE_DARK
/usr/bin/unzip -d $(extensiondir)/\{$(dark_guid)\} $(top_builddir)/arc-dark-firefox-theme-$(VERSION).xpi
endif # ENABLE_LIGHT
uninstall:
if ENABLE_LIGHT
rm -rf $(extensiondir)/\{$(light_guid)\}
endif # ENABLE_LIGHT
if ENABLE_DARKER
rm -rf $(extensiondir)/\{$(darker_guid)\}
endif # ENABLE_DARKER
if ENABLE_DARK
rm -rf $(extensiondir)/\{$(dark_guid)\}
endif # ENABLE_DARK
CLEANFILES = \
arc-firefox-theme-$(VERSION).xpi \
arc-darker-firefox-theme-$(VERSION).xpi \
arc-dark-firefox-theme-$(VERSION).xpi