Added an option to rename the ipsec script during installation
Also rename the man page and adjust all references in the script, the man page and other files. Closes #194.
This commit is contained in:
+20
-7
@@ -1,22 +1,35 @@
|
||||
sbin_SCRIPTS = ipsec
|
||||
CLEANFILES = ipsec ipsec.8
|
||||
dist_man8_MANS = ipsec.8
|
||||
sbin_SCRIPTS = _ipsec
|
||||
CLEANFILES = _ipsec _ipsec.8
|
||||
dist_man8_MANS = _ipsec.8
|
||||
EXTRA_DIST = ipsec.in ipsec.8.in Android.mk
|
||||
|
||||
ipsec.8 : ipsec.8.in
|
||||
_ipsec.8 : ipsec.8.in
|
||||
sed \
|
||||
-e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
|
||||
$(srcdir)/$@.in > $@
|
||||
-e "s:@IPSEC_SCRIPT@:$(ipsec_script):g" \
|
||||
-e "s:@IPSEC_SCRIPT_UPPER@:$(ipsec_script_upper):g" \
|
||||
$< > $@
|
||||
|
||||
ipsec : ipsec.in
|
||||
_ipsec : ipsec.in
|
||||
sed \
|
||||
-e "s:@IPSEC_SHELL@:/bin/sh:" \
|
||||
-e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
|
||||
-e "s:@IPSEC_NAME@:$(PACKAGE_NAME):" \
|
||||
-e "s:@IPSEC_DISTRO@::" \
|
||||
-e "s:@IPSEC_DIR@:$(ipsecdir):" \
|
||||
-e "s:@IPSEC_SCRIPT@:$(ipsec_script):" \
|
||||
-e "s:@IPSEC_SBINDIR@:$(sbindir):" \
|
||||
-e "s:@IPSEC_CONFDIR@:$(sysconfdir):" \
|
||||
-e "s:@IPSEC_PIDDIR@:$(piddir):" \
|
||||
$(srcdir)/$@.in > $@
|
||||
$< > $@
|
||||
chmod +x $@
|
||||
|
||||
install-exec-hook:
|
||||
mv $(DESTDIR)$(sbindir)/_ipsec $(DESTDIR)$(sbindir)/$(ipsec_script)
|
||||
|
||||
install-data-hook:
|
||||
mv $(DESTDIR)$(man8dir)/_ipsec.8 $(DESTDIR)$(man8dir)/$(ipsec_script).8
|
||||
|
||||
uninstall-hook:
|
||||
rm -f $(DESTDIR)$(sbindir)/$(ipsec_script)
|
||||
rm -f $(DESTDIR)$(man8dir)/$(ipsec_script).8
|
||||
|
||||
Reference in New Issue
Block a user