Commit 9e9014e5 authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

PKGBUILD: add post_upgrade messages

parent e9c5de21
*.tar.xz
*.tar.xz.sig
/PKGBUILD
/netctl.install
......@@ -49,16 +49,19 @@ netctl-$(VERSION).tar.xz:
gpg --detach-sign $@
pkgbuild: PKGBUILD
PKGBUILD: netctl-$(VERSION).tar.xz contrib/PKGBUILD.in
PKGBUILD: netctl-$(VERSION).tar.xz netctl.install contrib/PKGBUILD.in
sed -e "s|@pkgver@|$(VERSION)|g" \
-e "s|@md5sum@|$(shell md5sum $< | cut -d ' ' -f 1)|" \
-e "s|@md5sum.sig@|$(shell md5sum $<.sig | cut -d ' ' -f 1)|" \
$(lastword $^) > $@
netctl.install: contrib/netctl.install
cp $< $@
upload: netctl-$(VERSION).tar.xz
scp $< $<.sig sources.archlinux.org:/srv/ftp/other/packages/netctl
clean:
$(MAKE) -C docs clean
-@rm -vf PKGBUILD *.tar.xz *.tar.xz.sig 2>/dev/null
-@rm -vf netctl-*.tar.xz{,.sig} PKGBUILD netctl.install
......@@ -19,6 +19,7 @@ optdepends=('dialog: for the menu based wifi assistant'
'ppp: for PPP connections'
'openvswitch: for Open vSwitch connections'
)
install=netctl.install
source=(https://sources.archlinux.org/other/packages/netctl/netctl-${pkgver}.tar.xz{,.sig})
arch=('any')
md5sums=('@md5sum@'
......
post_upgrade() {
if [[ $(vercmp 1.18 "$2") -gt 0 ]]; then
grep -ls '^.include ' /etc/systemd/system/netctl@*.service | \
while read -r unit; do
profile=$(systemd-escape --unescape "${unit:27:-8}")
echo ":: The unit for profile '$profile' uses deprecated features."
echo " Consider running: netctl reenable $(printf '%q' "$profile")"
done
fi
}
......@@ -3,6 +3,7 @@
MANPAGES = netctl.1 netctl-auto.1 netctl.profile.5 netctl.special.7
.PHONY: manpages install $(MANPAGES:=-install) clean
manpages: $(MANPAGES)
$(MANPAGES): %: %.txt
a2x -d manpage -f manpage -a manversion=$(VERSION) $<
......@@ -12,5 +13,5 @@ $(MANPAGES:=-install): %-install: %
install -Dm644 $< $(DESTDIR)/usr/share/man/man$(subst .,,$(suffix $<))/$<
clean:
-@rm -vf $(MANPAGES) 2>/dev/null
-@rm -vf $(MANPAGES)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment