Merge branch 'silent-automake'
[strongswan.git] / src / ipsec / Makefile.am
1 sbin_SCRIPTS = _ipsec
2 CLEANFILES = _ipsec _ipsec.8
3 dist_man8_MANS = _ipsec.8
4 EXTRA_DIST = _ipsec.in _ipsec.8.in Android.mk
5
6 _ipsec.8 : _ipsec.8.in
7         $(AM_V_GEN) \
8         sed \
9         -e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
10         -e "s:@IPSEC_SCRIPT@:$(ipsec_script):g" \
11         -e "s:@IPSEC_SCRIPT_UPPER@:$(ipsec_script_upper):g" \
12         $(srcdir)/$@.in > $@
13
14 _ipsec : _ipsec.in
15         $(AM_V_GEN) \
16         sed \
17         -e "s:@IPSEC_SHELL@:/bin/sh:" \
18         -e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
19         -e "s:@IPSEC_NAME@:$(PACKAGE_NAME):" \
20         -e "s:@IPSEC_DISTRO@::" \
21         -e "s:@IPSEC_DIR@:$(ipsecdir):" \
22         -e "s:@IPSEC_SCRIPT@:$(ipsec_script):" \
23         -e "s:@IPSEC_SBINDIR@:$(sbindir):" \
24         -e "s:@IPSEC_CONFDIR@:$(sysconfdir):" \
25         -e "s:@IPSEC_PIDDIR@:$(piddir):" \
26         $(srcdir)/$@.in > $@
27         chmod +x $@
28
29 install-exec-hook:
30         mv $(DESTDIR)$(sbindir)/_ipsec $(DESTDIR)$(sbindir)/$(ipsec_script)
31
32 install-data-hook:
33         mv $(DESTDIR)$(man8dir)/_ipsec.8 $(DESTDIR)$(man8dir)/$(ipsec_script).8
34
35 uninstall-hook:
36         rm -f $(DESTDIR)$(sbindir)/$(ipsec_script)
37         rm -f $(DESTDIR)$(man8dir)/$(ipsec_script).8