Improve permissions and strip binaries
- Use 0755 for directories - Use 0644 for libraries, includes and shared files - Use -s (strip) parameter when installing binaries and libraries
This commit is contained in:
parent
50522df3d9
commit
dabf0e5918
13 changed files with 53 additions and 53 deletions
|
|
@ -69,8 +69,8 @@ clixon.mk: clixon.mk.cpp
|
||||||
$(CPP) -P -traditional-cpp -x assembler-with-cpp -Dprefix=$(prefix) -Dlocalstatedir=$(localstatedir) -Dsysconfdir=$(sysconfdir) -Ddatadir=$(datadir) -Dlibdir=$(libdir) $< > $@
|
$(CPP) -P -traditional-cpp -x assembler-with-cpp -Dprefix=$(prefix) -Dlocalstatedir=$(localstatedir) -Dsysconfdir=$(sysconfdir) -Ddatadir=$(datadir) -Dlibdir=$(libdir) $< > $@
|
||||||
|
|
||||||
install: clixon.mk
|
install: clixon.mk
|
||||||
install -d -m 755 $(DESTDIR)$(datadir)/clixon
|
install -d -m 0755 $(DESTDIR)$(datadir)/clixon
|
||||||
install -m 755 clixon.mk $(DESTDIR)$(datadir)/clixon
|
install -m 0644 clixon.mk $(DESTDIR)$(datadir)/clixon
|
||||||
for i in $(SUBDIRS) doc; \
|
for i in $(SUBDIRS) doc; \
|
||||||
do (cd $$i; $(MAKE) $(MFLAGS) $@)||exit 1; done; \
|
do (cd $$i; $(MAKE) $(MFLAGS) $@)||exit 1; done; \
|
||||||
echo "Install for compilation by: make install-include"
|
echo "Install for compilation by: make install-include"
|
||||||
|
|
|
||||||
|
|
@ -98,15 +98,15 @@ distclean: clean
|
||||||
# Also create a libexec/ directory for writeable/temporary files.
|
# Also create a libexec/ directory for writeable/temporary files.
|
||||||
# Put config file in etc/
|
# Put config file in etc/
|
||||||
install: install-lib $(APPL)
|
install: install-lib $(APPL)
|
||||||
install -d $(DESTDIR)$(sbindir)
|
install -d -m 0755 $(DESTDIR)$(sbindir)
|
||||||
install $(APPL) $(DESTDIR)$(sbindir)
|
install -m 0755 -s $(APPL) $(DESTDIR)$(sbindir)
|
||||||
|
|
||||||
install-lib: $(MYLIB)
|
install-lib: $(MYLIB)
|
||||||
install -d $(DESTDIR)$(libdir)
|
install -d -m 0755 $(DESTDIR)$(libdir)
|
||||||
install $(MYLIB) $(DESTDIR)$(libdir)
|
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
|
||||||
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_config.so.2
|
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_config.so.2
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_config.so
|
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_config.so
|
||||||
install -d $(DESTDIR)$(libdir)/clixon/plugins/backend
|
install -d -m 0755 $(DESTDIR)$(libdir)/clixon/plugins/backend
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(sbindir)/$(APPL)
|
rm -f $(DESTDIR)$(sbindir)/$(APPL)
|
||||||
|
|
@ -114,8 +114,8 @@ uninstall:
|
||||||
rm -f $(DESTDIR)$(includedir)/clixon/*
|
rm -f $(DESTDIR)$(includedir)/clixon/*
|
||||||
|
|
||||||
install-include: clixon_backend.h clixon_backend_handle.h clixon_backend_transaction.h
|
install-include: clixon_backend.h clixon_backend_handle.h clixon_backend_transaction.h
|
||||||
install -d $(DESTDIR)$(includedir)/clixon
|
install -d -m 0755 $(DESTDIR)$(includedir)/clixon
|
||||||
install -m 644 $^ $(DESTDIR)$(includedir)/clixon
|
install -m 0644 $^ $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
|
||||||
|
|
@ -102,19 +102,19 @@ distclean: clean
|
||||||
# Also create a libexec/ directory for writeable/temporary files.
|
# Also create a libexec/ directory for writeable/temporary files.
|
||||||
# Put config file in etc/
|
# Put config file in etc/
|
||||||
install: install-lib $(APPL)
|
install: install-lib $(APPL)
|
||||||
install -d $(DESTDIR)$(bindir)
|
install -d -m 0755 $(DESTDIR)$(bindir)
|
||||||
install $(APPL) $(DESTDIR)$(bindir)
|
install -m 0644 -s $(APPL) $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
install-lib: $(MYLIB)
|
install-lib: $(MYLIB)
|
||||||
install -d $(DESTDIR)$(libdir)
|
install -d -m 0755 $(DESTDIR)$(libdir)
|
||||||
install $(MYLIB) $(DESTDIR)$(libdir)
|
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
|
||||||
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_cli.so.2
|
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_cli.so.2
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_cli.so
|
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_cli.so
|
||||||
install -d $(DESTDIR)$(libdir)/clixon/plugins/cli
|
install -d -m 0755 $(DESTDIR)$(libdir)/clixon/plugins/cli
|
||||||
|
|
||||||
install-include: clixon_cli.h clixon_cli_api.h
|
install-include: clixon_cli.h clixon_cli_api.h
|
||||||
install -d $(DESTDIR)$(includedir)/clixon
|
install -d -m 0755 $(DESTDIR)$(includedir)/clixon
|
||||||
install -m 644 $^ $(DESTDIR)$(includedir)/clixon
|
install -m 0644 $^ $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
||||||
|
|
|
||||||
|
|
@ -100,18 +100,18 @@ distclean: clean
|
||||||
# Also create a libexec/ directory for writeable/temporary files.
|
# Also create a libexec/ directory for writeable/temporary files.
|
||||||
# Put config file in etc/
|
# Put config file in etc/
|
||||||
install: install-lib $(APPL)
|
install: install-lib $(APPL)
|
||||||
install -d $(DESTDIR)$(bindir)
|
install -d -m 0755 $(DESTDIR)$(bindir)
|
||||||
install $(APPL) $(DESTDIR)$(bindir)
|
install -m 0755 -s $(APPL) $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
install-lib: $(MYLIB)
|
install-lib: $(MYLIB)
|
||||||
install -d $(DESTDIR)$(libdir)
|
install -d -m 0755 $(DESTDIR)$(libdir)
|
||||||
install $(MYLIB) $(DESTDIR)$(libdir)
|
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
|
||||||
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_netconf.so.2
|
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_netconf.so.2
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_netconf.so
|
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_netconf.so
|
||||||
|
|
||||||
install-include: clixon_netconf.h
|
install-include: clixon_netconf.h
|
||||||
install -d $(DESTDIR)$(includedir)/clixon
|
install -d -m 0755 $(DESTDIR)$(includedir)/clixon
|
||||||
install -m 644 $^ $(DESTDIR)$(includedir)/clixon
|
install -m 0644 $^ $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
rm -f $(DESTDIR)$(bindir)/$(APPL)
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ distclean: clean
|
||||||
# Also create a libexec/ directory for writeable/temporary files.
|
# Also create a libexec/ directory for writeable/temporary files.
|
||||||
# Put config file in etc/
|
# Put config file in etc/
|
||||||
install: install-lib $(APPL)
|
install: install-lib $(APPL)
|
||||||
install -d $(DESTDIR)$(wwwdir)
|
install -d -m 0755 $(DESTDIR)$(wwwdir)
|
||||||
install $(APPL) $(DESTDIR)$(wwwdir)
|
install -m 0755 -s $(APPL) $(DESTDIR)$(wwwdir)
|
||||||
|
|
||||||
install-lib: $(MYLIB)
|
install-lib: $(MYLIB)
|
||||||
install -d $(DESTDIR)$(libdir)
|
install -d $(DESTDIR)$(libdir)
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@ install-include:
|
||||||
do (cd $$i ; $(MAKE) $(MFLAGS) $@)||exit 1; done;
|
do (cd $$i ; $(MAKE) $(MFLAGS) $@)||exit 1; done;
|
||||||
|
|
||||||
install: $(APPL)
|
install: $(APPL)
|
||||||
install -d $(DESTDIR)$(bindir)
|
install -d -m 0755 $(DESTDIR)$(bindir)
|
||||||
install $(APPL) $(DESTDIR)$(bindir)
|
install -m 0755 -s $(APPL) $(DESTDIR)$(bindir)
|
||||||
for i in $(SUBDIRS); \
|
for i in $(SUBDIRS); \
|
||||||
do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done
|
do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,8 @@ distclean: clean
|
||||||
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
||||||
|
|
||||||
install: $(PLUGIN)
|
install: $(PLUGIN)
|
||||||
install -d $(DESTDIR)$(libdir)/xmldb
|
install -d -m 0755 $(DESTDIR)$(libdir)/xmldb
|
||||||
install $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
|
install -m 0644 -s $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ distclean: clean
|
||||||
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
|
||||||
|
|
||||||
install: $(PLUGIN)
|
install: $(PLUGIN)
|
||||||
install -d $(DESTDIR)$(libdir)/xmldb
|
install -d -m 0755 $(DESTDIR)$(libdir)/xmldb
|
||||||
install $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
|
install -m 0644 -s $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@ distclean: clean
|
||||||
rm -f Makefile *~ .depend clixonrc
|
rm -f Makefile *~ .depend clixonrc
|
||||||
|
|
||||||
install: clixonrc
|
install: clixonrc
|
||||||
install -m 755 -d $(DESTDIR)$(sysconfdir)
|
install -m 0755 -d $(DESTDIR)$(sysconfdir)
|
||||||
install -m 755 clixonrc $(DESTDIR)$(sysconfdir)
|
install -m 0644 clixonrc $(DESTDIR)$(sysconfdir)
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,21 +111,21 @@ distclean: clean
|
||||||
(cd docker && $(MAKE) $(MFLAGS) $@)
|
(cd docker && $(MAKE) $(MFLAGS) $@)
|
||||||
|
|
||||||
install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(RESTCONF_PLUGIN) $(APPNAME).xml
|
install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(RESTCONF_PLUGIN) $(APPNAME).xml
|
||||||
install -d $(DESTDIR)$(clixon_SYSCONFDIR)
|
install -d -m 0755 $(DESTDIR)$(clixon_SYSCONFDIR)
|
||||||
install $(APPNAME).xml $(DESTDIR)$(clixon_SYSCONFDIR)
|
install -m 0644 $(APPNAME).xml $(DESTDIR)$(clixon_SYSCONFDIR)
|
||||||
install -d $(DESTDIR)$(clixon_DBSPECDIR)/yang
|
install -d -m 0755 $(DESTDIR)$(clixon_DBSPECDIR)/yang
|
||||||
install $(YANGSPECS) $(DESTDIR)$(clixon_DBSPECDIR)/yang
|
install -m 0644 $(YANGSPECS) $(DESTDIR)$(clixon_DBSPECDIR)/yang
|
||||||
install -d $(DESTDIR)$(clixon_LIBDIR)/cli
|
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/cli
|
||||||
install $(CLI_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/cli;
|
install -m 0644 -s $(CLI_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/cli
|
||||||
install -d $(DESTDIR)$(clixon_LIBDIR)/backend
|
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/backend
|
||||||
install $(BE_PLUGIN) $(BE2_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/backend;
|
install -m 0644 -s $(BE_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/backend
|
||||||
install -d $(DESTDIR)$(clixon_LIBDIR)/netconf
|
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/netconf
|
||||||
install $(NETCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/netconf;
|
install -m 0644 -s $(NETCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/netconf
|
||||||
install -d $(DESTDIR)$(clixon_LIBDIR)/restconf
|
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/restconf
|
||||||
install $(RESTCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/restconf;
|
install -m 0644 $(RESTCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/restconf
|
||||||
install -d $(DESTDIR)$(clixon_LIBDIR)/clispec
|
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/clispec
|
||||||
install $(CLISPECS) $(DESTDIR)$(clixon_LIBDIR)/clispec;
|
install -m 0644 $(CLISPECS) $(DESTDIR)$(clixon_LIBDIR)/clispec
|
||||||
install -d $(DESTDIR)$(clixon_LOCALSTATEDIR)
|
install -d -m 0755 $(DESTDIR)$(clixon_LOCALSTATEDIR)
|
||||||
(cd docker && $(MAKE) $(MFLAGS) $@)
|
(cd docker && $(MAKE) $(MFLAGS) $@)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ depend:
|
||||||
install:
|
install:
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
install -m 755 -d $(DESTDIR)$(includedir)/clixon
|
install -m 0755 -d $(DESTDIR)$(includedir)/clixon
|
||||||
install -m 644 *.h $(DESTDIR)$(includedir)/clixon
|
install -m 0644 *.h $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf $(DESTDIR)$(includedir)/clixon
|
rm -rf $(DESTDIR)$(includedir)/clixon
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,8 @@ install: install-lib
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
install-lib: $(MYLIB)
|
install-lib: $(MYLIB)
|
||||||
install -m 755 -d $(DESTDIR)$(libdir)
|
install -m 0755 -d $(DESTDIR)$(libdir)
|
||||||
install -m 755 $(MYLIB) $(DESTDIR)$(libdir)
|
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
|
||||||
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon.so.3
|
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon.so.3
|
||||||
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon.so
|
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon.so
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ distclean: clean
|
||||||
install: $(YANGSPECS)
|
install: $(YANGSPECS)
|
||||||
echo $(DESTDIR)$(datarootdir)/clixon/clixon.mk
|
echo $(DESTDIR)$(datarootdir)/clixon/clixon.mk
|
||||||
echo $(DESTDIR)$(clixon_DATADIR)
|
echo $(DESTDIR)$(clixon_DATADIR)
|
||||||
install -d $(DESTDIR)$(clixon_DATADIR)
|
install -d -m 0755 $(DESTDIR)$(clixon_DATADIR)
|
||||||
install $(YANGSPECS) $(DESTDIR)$(clixon_DATADIR)
|
install -m 0644 $(YANGSPECS) $(DESTDIR)$(clixon_DATADIR)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
(cd $(DESTDIR)$(clixon_DATADIR); rm -rf $(YANGSPECS))
|
(cd $(DESTDIR)$(clixon_DATADIR); rm -rf $(YANGSPECS))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue