diff options
author | rusty-snake <41237666+rusty-snake@users.noreply.github.com> | 2020-06-04 10:41:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 10:41:08 +0000 |
commit | dae3933bc30a08e355083b67ee99e688bfa13b4e (patch) | |
tree | f45ba1b21c2e4e70530dcbc2eb4122d86eaa1fd9 /Makefile.in | |
parent | Set quiet in w3m profile (#3444) (diff) | |
download | firejail-dae3933bc30a08e355083b67ee99e688bfa13b4e.tar.gz firejail-dae3933bc30a08e355083b67ee99e688bfa13b4e.tar.zst firejail-dae3933bc30a08e355083b67ee99e688bfa13b4e.zip |
rework make realinstall and uninstall (#3435)
- remove -c, the manpage says it is ignored
- $(DESTDIR)/$(bindir)/. -> $(DESTDIR)$(bindir) and so on
- install contrib by file glob (*.py, *.sh)
- split long lines
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 104 |
1 files changed, 50 insertions, 54 deletions
diff --git a/Makefile.in b/Makefile.in index 575c5d614..56bd3b099 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -93,73 +93,69 @@ distclean: clean | |||
93 | 93 | ||
94 | realinstall: | 94 | realinstall: |
95 | # firejail executable | 95 | # firejail executable |
96 | install -m 0755 -d $(DESTDIR)/$(bindir) | 96 | install -m 0755 -d $(DESTDIR)$(bindir) |
97 | install -c -m 0755 src/firejail/firejail $(DESTDIR)/$(bindir)/. | 97 | install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir) |
98 | ifeq ($(HAVE_SUID),yes) | 98 | ifeq ($(HAVE_SUID),yes) |
99 | chmod u+s $(DESTDIR)/$(bindir)/firejail | 99 | chmod u+s $(DESTDIR)$(bindir)/firejail |
100 | endif | 100 | endif |
101 | # firemon executable | 101 | # firemon executable |
102 | install -c -m 0755 src/firemon/firemon $(DESTDIR)/$(bindir)/. | 102 | install -m 0755 src/firemon/firemon $(DESTDIR)$(bindir) |
103 | # firecfg executable | 103 | # firecfg executable |
104 | install -c -m 0755 src/firecfg/firecfg $(DESTDIR)/$(bindir)/. | 104 | install -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir) |
105 | # libraries and plugins | 105 | # libraries and plugins |
106 | install -m 0755 -d $(DESTDIR)/$(libdir)/firejail | 106 | install -m 0755 -d $(DESTDIR)$(libdir)/firejail |
107 | install -m 0644 -t $(DESTDIR)/$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS) src/firecfg/firecfg.config | 107 | install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS) src/firecfg/firecfg.config |
108 | install -m 0755 -t $(DESTDIR)/$(libdir)/firejail $(SBOX_APPS) | 108 | install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS) |
109 | ifeq ($(HAVE_CONTRIB_INSTALL),yes) | 109 | ifeq ($(HAVE_CONTRIB_INSTALL),yes) |
110 | install -c -m 0755 contrib/fix_private-bin.py $(DESTDIR)/$(libdir)/firejail/. | 110 | install -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh |
111 | install -c -m 0755 contrib/fjclip.py $(DESTDIR)/$(libdir)/firejail/. | 111 | # vim syntax |
112 | install -c -m 0755 contrib/fjdisplay.py $(DESTDIR)/$(libdir)/firejail/. | 112 | install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect |
113 | install -c -m 0755 contrib/fjresize.py $(DESTDIR)/$(libdir)/firejail/. | 113 | install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax |
114 | install -c -m 0755 contrib/fj-mkdeb.py $(DESTDIR)/$(libdir)/firejail/. | 114 | install -m 0644 contrib/vim/ftdetect/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect |
115 | install -c -m 0755 contrib/gdb-firejail.sh $(DESTDIR)/$(libdir)/firejail/. | 115 | install -m 0644 contrib/vim/syntax/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax |
116 | install -c -m 0755 contrib/jail_prober.py $(DESTDIR)/$(libdir)/firejail/. | ||
117 | install -c -m 0755 contrib/sort.py $(DESTDIR)/$(libdir)/firejail/. | ||
118 | install -c -m 0755 contrib/syscalls.sh $(DESTDIR)/$(libdir)/firejail/. | ||
119 | install -c -m 0755 contrib/update_deb.sh $(DESTDIR)/$(libdir)/firejail/. | ||
120 | install -m 0755 -d $(DESTDIR)/$(datarootdir)/vim/vimfiles/ftdetect/. | ||
121 | install -m 0755 -d $(DESTDIR)/$(datarootdir)/vim/vimfiles/syntax/. | ||
122 | install -c -m 0644 contrib/vim/ftdetect/firejail.vim $(DESTDIR)/$(datarootdir)/vim/vimfiles/ftdetect/. | ||
123 | install -c -m 0644 contrib/vim/syntax/firejail.vim $(DESTDIR)/$(datarootdir)/vim/vimfiles/syntax/. | ||
124 | endif | 116 | endif |
125 | # documents | 117 | # documents |
126 | install -m 0755 -d $(DESTDIR)/$(DOCDIR) | 118 | install -m 0755 -d $(DESTDIR)$(DOCDIR) |
127 | install -c -m 0644 COPYING $(DESTDIR)/$(DOCDIR)/. | 119 | install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/* |
128 | install -c -m 0644 README $(DESTDIR)/$(DOCDIR)/. | ||
129 | install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. | ||
130 | install -c -m 0644 etc/templates/* $(DESTDIR)/$(DOCDIR)/. | ||
131 | # etc files | ||
132 | ifeq ($(BUSYBOX_WORKAROUND),yes) | 120 | ifeq ($(BUSYBOX_WORKAROUND),yes) |
133 | ./mketc.sh | 121 | ./mketc.sh |
134 | endif | 122 | endif |
135 | install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail | 123 | install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail |
136 | install -m 0644 -t $(DESTDIR)/$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config | 124 | install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config |
137 | sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" | 125 | if [ ! -f $(DESTDIR)$(sysconfdir)/firejail/login.users ]; then \ |
126 | install -m 0644 etc/login.users $(DESTDIR)$(sysconfdir)/firejail \ | ||
127 | fi | ||
138 | ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) | 128 | ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) |
139 | # install apparmor profile | 129 | # install apparmor profile |
140 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;" | 130 | if [ ! -d $(DESTDIR)$(sysconfdir)/apparmor.d ]; then \ |
141 | install -c -m 0644 etc/apparmor/firejail-default $(DESTDIR)/$(sysconfdir)/apparmor.d/. | 131 | install -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d \ |
142 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;" | 132 | fi |
133 | install -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d | ||
134 | if [ ! -d $(DESTDIR)$(sysconfdir)/apparmor.d/local ]; then \ | ||
135 | install -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d/local \ | ||
136 | fi | ||
143 | # install apparmor profile customization file | 137 | # install apparmor profile customization file |
144 | sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-local ]; then install -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/.; fi;" | 138 | if [ ! -f $(DESTDIR)$(sysconfdir)/apparmor.d/local/firejail-local ]; then \ |
139 | install -m 0644 etc/apparmor/firejail-local $(DESTDIR)$(sysconfdir)/apparmor.d/local \ | ||
140 | fi | ||
145 | endif | 141 | endif |
146 | # man pages | 142 | # man pages |
147 | install -m 0755 -d $(DESTDIR)/$(mandir)/man1 | 143 | install -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 |
148 | install -m 0755 -d $(DESTDIR)/$(mandir)/man5 | ||
149 | for man in $(MANPAGES); do \ | 144 | for man in $(MANPAGES); do \ |
150 | rm -f $$man.gz; \ | 145 | rm -f $$man.gz; \ |
151 | gzip -9n $$man; \ | 146 | gzip -9n $$man; \ |
152 | case "$$man" in \ | 147 | case "$$man" in \ |
153 | *.1) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man1/; ;; \ | 148 | *.1) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man1/; ;; \ |
154 | *.5) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man5/; ;; \ | 149 | *.5) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man5/; ;; \ |
155 | esac; \ | 150 | esac; \ |
156 | done | 151 | done |
157 | rm -f $(MANPAGES) $(MANPAGES:%=%.gz) | 152 | rm -f $(MANPAGES) $(MANPAGES:%=%.gz) |
158 | # bash completion | 153 | # bash completion |
159 | install -m 0755 -d $(DESTDIR)/$(datarootdir)/bash-completion/completions | 154 | install -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions |
160 | install -c -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail | 155 | install -m 0644 -t $(DESTDIR)$(datarootdir)/bash-completions \ |
161 | install -c -m 0644 src/bash_completion/firemon.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon | 156 | src/bash_completion/firejail.bash_completion \ |
162 | install -c -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg | 157 | src/bash_completion/firemon.bash_completion \ |
158 | src/bash_completion/firecfg.bash_completion | ||
163 | 159 | ||
164 | install: all | 160 | install: all |
165 | $(MAKE) realinstall | 161 | $(MAKE) realinstall |
@@ -169,19 +165,19 @@ install-strip: all | |||
169 | $(MAKE) realinstall | 165 | $(MAKE) realinstall |
170 | 166 | ||
171 | uninstall: | 167 | uninstall: |
172 | rm -f $(DESTDIR)/$(bindir)/firejail | 168 | rm -f $(DESTDIR)$(bindir)/firejail |
173 | rm -f $(DESTDIR)/$(bindir)/firemon | 169 | rm -f $(DESTDIR)$(bindir)/firemon |
174 | rm -f $(DESTDIR)/$(bindir)/firecfg | 170 | rm -f $(DESTDIR)$(bindir)/firecfg |
175 | rm -fr $(DESTDIR)/$(libdir)/firejail | 171 | rm -fr $(DESTDIR)$(libdir)/firejail |
176 | rm -fr $(DESTDIR)/$(datarootdir)/doc/firejail | 172 | rm -fr $(DESTDIR)$(datarootdir)/doc/firejail |
177 | for man in $(MANPAGES); do \ | 173 | for man in $(MANPAGES); do \ |
178 | rm -f $(DESTDIR)/$(mandir)/man5/$$man*; \ | 174 | rm -f $(DESTDIR)$(mandir)/man5/$$man*; \ |
179 | rm -f $(DESTDIR)/$(mandir)/man1/$$man*; \ | 175 | rm -f $(DESTDIR)$(mandir)/man1/$$man*; \ |
180 | done | 176 | done |
181 | rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail | 177 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail |
182 | rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon | 178 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon |
183 | rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg | 179 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg |
184 | @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)/$(sysconfdir)/firejail', see #2038." | 180 | @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)$(sysconfdir)/firejail', see #2038." |
185 | 181 | ||
186 | DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh.in COPYING README RELNOTES" | 182 | DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh.in COPYING README RELNOTES" |
187 | DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils test/chroot" | 183 | DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils test/chroot" |