diff options
author | 2024-06-10 06:07:04 +0000 | |
---|---|---|
committer | 2024-06-10 06:07:04 +0000 | |
commit | fa8e2f14153e2d53c4b8ce2192dcb05e6b9eb959 (patch) | |
tree | 2dbefeea638fcdbba8043136a5700ab783bb0460 /Makefile | |
parent | docs: add precedence info to manpage & fix noblacklist example (#6359) (diff) | |
parent | build: sort/split some install commands (diff) | |
download | firejail-fa8e2f14153e2d53c4b8ce2192dcb05e6b9eb959.tar.gz firejail-fa8e2f14153e2d53c4b8ce2192dcb05e6b9eb959.tar.zst firejail-fa8e2f14153e2d53c4b8ce2192dcb05e6b9eb959.zip |
Merge pull request #6366 from kmk3/build-standardize-install
build: standardize install commands
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 42 |
1 files changed, 23 insertions, 19 deletions
@@ -204,16 +204,16 @@ distclean: clean | |||
204 | install: all config.mk | 204 | install: all config.mk |
205 | # firejail executable | 205 | # firejail executable |
206 | $(INSTALL) -m 0755 -d $(DESTDIR)$(bindir) | 206 | $(INSTALL) -m 0755 -d $(DESTDIR)$(bindir) |
207 | $(INSTALL) -m 0755 src/firejail/firejail $(DESTDIR)$(bindir) | 207 | $(INSTALL) -m 0755 -t $(DESTDIR)$(bindir) src/firejail/firejail |
208 | ifeq ($(HAVE_SUID),-DHAVE_SUID) | 208 | ifeq ($(HAVE_SUID),-DHAVE_SUID) |
209 | chmod u+s $(DESTDIR)$(bindir)/firejail | 209 | chmod u+s $(DESTDIR)$(bindir)/firejail |
210 | endif | 210 | endif |
211 | # firemon executable | 211 | # firemon executable |
212 | $(INSTALL) -m 0755 src/firemon/firemon $(DESTDIR)$(bindir) | 212 | $(INSTALL) -m 0755 -t $(DESTDIR)$(bindir) src/firemon/firemon |
213 | # firecfg executable | 213 | # firecfg executable |
214 | $(INSTALL) -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir) | 214 | $(INSTALL) -m 0755 -t $(DESTDIR)$(bindir) src/firecfg/firecfg |
215 | # jailcheck executable | 215 | # jailcheck executable |
216 | $(INSTALL) -m 0755 src/jailcheck/jailcheck $(DESTDIR)$(bindir) | 216 | $(INSTALL) -m 0755 -t $(DESTDIR)$(bindir) src/jailcheck/jailcheck |
217 | # libraries and plugins | 217 | # libraries and plugins |
218 | $(INSTALL) -m 0755 -d $(DESTDIR)$(libdir)/firejail | 218 | $(INSTALL) -m 0755 -d $(DESTDIR)$(libdir)/firejail |
219 | $(INSTALL) -m 0755 -t $(DESTDIR)$(libdir)/firejail src/firecfg/firejail-welcome.sh | 219 | $(INSTALL) -m 0755 -t $(DESTDIR)$(libdir)/firejail src/firecfg/firejail-welcome.sh |
@@ -230,12 +230,12 @@ ifeq ($(HAVE_CONTRIB_INSTALL),yes) | |||
230 | $(INSTALL) -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh | 230 | $(INSTALL) -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh |
231 | # vim syntax | 231 | # vim syntax |
232 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect | 232 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect |
233 | $(INSTALL) -m 0644 -t $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect contrib/vim/ftdetect/firejail.vim | ||
233 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax | 234 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax |
234 | $(INSTALL) -m 0644 contrib/vim/ftdetect/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect | 235 | $(INSTALL) -m 0644 -t $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax contrib/syntax/files/firejail.vim |
235 | $(INSTALL) -m 0644 contrib/syntax/files/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax | ||
236 | # gtksourceview language-specs | 236 | # gtksourceview language-specs |
237 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/gtksourceview-5/language-specs | 237 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/gtksourceview-5/language-specs |
238 | $(INSTALL) -m 0644 contrib/syntax/files/firejail-profile.lang $(DESTDIR)$(datarootdir)/gtksourceview-5/language-specs | 238 | $(INSTALL) -m 0644 -t $(DESTDIR)$(datarootdir)/gtksourceview-5/language-specs contrib/syntax/files/firejail-profile.lang |
239 | endif | 239 | endif |
240 | # documents | 240 | # documents |
241 | $(INSTALL) -m 0755 -d $(DESTDIR)$(docdir) | 241 | $(INSTALL) -m 0755 -d $(DESTDIR)$(docdir) |
@@ -245,7 +245,9 @@ endif | |||
245 | $(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail/firecfg.d | 245 | $(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail/firecfg.d |
246 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config | 246 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config |
247 | $(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 | 247 | $(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 |
248 | sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then $(INSTALL) -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" | 248 | sh -c "if [ ! -f $(DESTDIR)$(sysconfdir)/firejail/login.users ]; then \ |
249 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/login.users; \ | ||
250 | fi" | ||
249 | ifeq ($(HAVE_IDS),-DHAVE_IDS) | 251 | ifeq ($(HAVE_IDS),-DHAVE_IDS) |
250 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/ids.config | 252 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/ids.config |
251 | endif | 253 | endif |
@@ -254,21 +256,23 @@ ifeq ($(BUSYBOX_WORKAROUND),yes) | |||
254 | endif | 256 | endif |
255 | ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) | 257 | ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) |
256 | # install apparmor profile | 258 | # install apparmor profile |
257 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then $(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;" | 259 | $(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d |
258 | $(INSTALL) -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d | 260 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/apparmor.d etc/apparmor/firejail-default |
259 | # install apparmor profile customization file | 261 | # install apparmor profile customization file |
260 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then $(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;" | 262 | $(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d/local |
261 | sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then $(INSTALL) -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; fi;" | 263 | sh -c "if [ ! -f $(DESTDIR)$(sysconfdir)/apparmor.d/local/firejail-default ]; then \ |
264 | $(INSTALL) -m 0644 etc/apparmor/firejail-local $(DESTDIR)$(sysconfdir)/apparmor.d/local/firejail-default; \ | ||
265 | fi" | ||
262 | # install apparmor base abstraction drop-in | 266 | # install apparmor base abstraction drop-in |
263 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions ]; then $(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions; fi;" | 267 | $(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d |
264 | sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d ]; then $(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d; fi;" | 268 | $(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d etc/apparmor/firejail-base |
265 | $(INSTALL) -m 0644 etc/apparmor/firejail-base $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d | ||
266 | endif | 269 | endif |
267 | ifneq ($(HAVE_MAN),no) | 270 | ifneq ($(HAVE_MAN),no) |
268 | # man pages | 271 | # man pages |
269 | $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 | 272 | $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man1 |
270 | $(INSTALL) -m 0644 $(MANPAGES1_GZ) $(DESTDIR)$(mandir)/man1/ | 273 | $(INSTALL) -m 0644 -t $(DESTDIR)$(mandir)/man1 $(MANPAGES1_GZ) |
271 | $(INSTALL) -m 0644 $(MANPAGES5_GZ) $(DESTDIR)$(mandir)/man5/ | 274 | $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man5 |
275 | $(INSTALL) -m 0644 -t $(DESTDIR)$(mandir)/man5 $(MANPAGES5_GZ) | ||
272 | endif | 276 | endif |
273 | # bash completion | 277 | # bash completion |
274 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions | 278 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions |
@@ -277,7 +281,7 @@ endif | |||
277 | $(INSTALL) -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg | 281 | $(INSTALL) -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg |
278 | # zsh completion | 282 | # zsh completion |
279 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/zsh/site-functions | 283 | $(INSTALL) -m 0755 -d $(DESTDIR)$(datarootdir)/zsh/site-functions |
280 | $(INSTALL) -m 0644 src/zsh_completion/_firejail $(DESTDIR)$(datarootdir)/zsh/site-functions/ | 284 | $(INSTALL) -m 0644 -t $(DESTDIR)$(datarootdir)/zsh/site-functions src/zsh_completion/_firejail |
281 | 285 | ||
282 | .PHONY: install-strip | 286 | .PHONY: install-strip |
283 | install-strip: strip install | 287 | install-strip: strip install |