]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
osx: ensure pre/postinstall scripts are created correctly
authorVincent Bernat <vincent@bernat.im>
Mon, 25 May 2015 17:36:34 +0000 (19:36 +0200)
committerVincent Bernat <vincent@bernat.im>
Mon, 25 May 2015 17:36:34 +0000 (19:36 +0200)
Because we declare the scripts/*install target in `edit.am` and in
`Makefile.am`, only one of them is used. With automake, it doesn't seem
possible to easily extend a target. Instead, do the chmod just before we
need it.

osx/Makefile.am

index 58fb87596c2cadb87e25d062e9858a2bd640bd56..76f52804ad2f1492cee2aea79fe547800d61a4a1 100644 (file)
@@ -33,6 +33,7 @@ pkg: requirements ../$(PKG_NAME)
 # provide optional components to be installed.
 pkg.1/$(PKG_NAME): $(PKG_DIR) scripts
        [ -d pkg.1 ] || mkdir pkg.1
+       chmod +x scripts/postinstall scripts/preinstall
        $(PKGBUILD) \
                --root $(PKG_DIR) \
                --identifier im.bernat.@PACKAGE@.daemon \
@@ -67,9 +68,7 @@ CLEANFILES  = $(TEMPLATES)
 distribution.xml: distribution.xml.in
 im.bernat.lldpd.plist: im.bernat.lldpd.plist.in
 scripts/postinstall: scripts/postinstall.in
-       chmod +x $@
 scripts/preinstall: scripts/preinstall.in
-       chmod +x $@
 include $(top_srcdir)/edit.am
 
 .PHONY: pkg requirements