diff options
author | TBK <tbk@jjtc.eu> | 2019-04-14 16:21:04 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-04-14 18:42:55 +0000 |
commit | bed76860d2d5e156227300887d9c2d0b812dfce0 (patch) | |
tree | b34901f4364e5a8025c73d92b9d26a0ddd077b83 /testing/debconf | |
parent | e590a505952001d381a4d9e850a2e15b33224167 (diff) | |
download | aports-bed76860d2d5e156227300887d9c2d0b812dfce0.tar.bz2 aports-bed76860d2d5e156227300887d9c2d0b812dfce0.tar.xz |
testing/debconf: new aport
Diffstat (limited to 'testing/debconf')
-rw-r--r-- | testing/debconf/APKBUILD | 48 | ||||
-rw-r--r-- | testing/debconf/fix-makefile_destdir.patch | 155 |
2 files changed, 203 insertions, 0 deletions
diff --git a/testing/debconf/APKBUILD b/testing/debconf/APKBUILD new file mode 100644 index 0000000000..7e2f3f4bf6 --- /dev/null +++ b/testing/debconf/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: TBK <alpine@jjtc.eu> +# Maintainer: TBK <alpine@jjtc.eu> +pkgname=debconf +pkgver=1.5.71 +pkgrel=0 +pkgdesc="A configuration management system for Debian packages." +url="https://packages.debian.org/debconf" +arch="noarch" +license="BSD-2-Clause" +options="!check" # Test suite is broken. CopyDBTestSetup is missing new method +depends="perl" +makedepends="coreutils findutils po4a" +subpackages="$pkgname-doc $pkgname-lang $pkgname-utils $pkgname-bash-completion:bashcomp:noarch" +source="https://deb.debian.org/debian/pool/main/d/debconf/debconf_$pkgver.tar.xz + fix-makefile_destdir.patch + " +builddir="$srcdir/$pkgname" + +build() { + make +} + +package() { + make PREFIX="/usr" DESTDIR="$pkgdir" install-i18n install-doc install-rest +} + +utils() { + depends="$pkgname" + pkgdesc="Small utilities for debconf developers." + + cd "$builddir" + make PREFIX="/usr" DESTDIR="$subpkgdir" install-utils +} + +bashcomp() { + depends="" + pkgdesc="Bash completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + mkdir -p "$subpkgdir"/usr/share/bash-completion/completions + install -m 644 "$builddir"/bash_completion \ + "$subpkgdir"/usr/share/bash-completion/completions/debconf + cd "$subpkgdir"/usr/share/bash-completion/completions + ln -s debconf debconf-show +} + +sha512sums="ec6115a6aea78233e28f932f3eb6af62576b55211187a4253791c540ac74629029af01d95b5b382d01d51e1ae218760188a1eb865c04cc4d59a0006d8aa4c45b debconf_1.5.71.tar.xz +86c8c0995921a15b67881a7f68f8db4fc785ebc05a03619f597bd71e3cfb628c0c5678b263d42715eded50c3c8b80a7e49a9671949a5f423936fc8801b262b9a fix-makefile_destdir.patch" diff --git a/testing/debconf/fix-makefile_destdir.patch b/testing/debconf/fix-makefile_destdir.patch new file mode 100644 index 0000000000..7c31b99828 --- /dev/null +++ b/testing/debconf/fix-makefile_destdir.patch @@ -0,0 +1,155 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,3 +1,4 @@ ++PREFIX=/usr + MUNGE=xargs perl -i.bak -ne ' \ + print $$_."\# This file was preprocessed, do not edit!\n" \ + if m:^\#!/usr/bin/perl:; \ +@@ -24,20 +25,24 @@ + + # Anything that goes in the debconf-utils package. + install-utils: +- install -d $(prefix)/usr/bin ++ install -d $(DESTDIR)$(PREFIX)/bin + find . -maxdepth 1 -perm /100 -type f -name 'debconf-*' | grep -v debconf-set-selections | grep -v debconf-show | grep -v debconf-copydb | grep -v debconf-communicate | grep -v debconf-apt-progress | grep -v debconf-escape | \ +- xargs -i install {} $(prefix)/usr/bin ++ xargs -i install {} $(DESTDIR)$(PREFIX)/bin + ++# Installs only english man pages ++install-doc: ++ $(MAKE) -C doc PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) install ++ + # Anything that goes in the debconf-i18n package. + install-i18n: +- $(MAKE) -C po install ++ $(MAKE) -C po PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) install + + PERL := perl + PERL_VENDORLIB := $(shell $(PERL) -MConfig -e 'print $$Config{vendorlib}') + + # This would probably be easier if we used setup.py ... + PYTHON2_SUPPORTED := $(shell pyversions -s) +-PYTHON_SITEDIR = $(prefix)/usr/lib/$(1)/$(if $(filter 2.0 2.1 2.2 2.3 2.4 2.5,$(patsubst python%,%,$(1))),site-packages,dist-packages) ++PYTHON_SITEDIR = $(DESTDIR)$(PREFIX)/lib/$(1)/$(if $(filter 2.0 2.1 2.2 2.3 2.4 2.5,$(patsubst python%,%,$(1))),site-packages,dist-packages) + + # The Python 2 package. + install-python2: +@@ -48,47 +53,47 @@ + + # The Python 3 package. + install-python3: +- install -d $(prefix)/usr/lib/python3/dist-packages +- install -m 0644 debconf.py $(prefix)/usr/lib/python3/dist-packages/ ++ install -d $(DESTDIR)$(PREFIX)/lib/python3/dist-packages ++ install -m 0644 debconf.py $(DESTDIR)$(PREFIX)/lib/python3/dist-packages/ + + # Install all else. + install-rest: +- install -d $(prefix)/etc \ +- $(prefix)/var/cache/debconf \ +- $(prefix)/usr/share/debconf \ +- $(prefix)/usr/share/pixmaps +- install -m 0644 debconf.conf $(prefix)/etc/ +- install -m 0644 debian-logo.png $(prefix)/usr/share/pixmaps/ ++ install -d $(DESTDIR)/etc \ ++ $(DESTDIR)/var/cache/debconf \ ++ $(DESTDIR)$(PREFIX)/share/debconf \ ++ $(DESTDIR)$(PREFIX)/share/pixmaps ++ install -m 0644 debconf.conf $(DESTDIR)/etc/ ++ install -m 0644 debian-logo.png $(DESTDIR)$(PREFIX)/share/pixmaps/ + # This one is the ultimate backup copy. +- grep -v '^#' debconf.conf > $(prefix)/usr/share/debconf/debconf.conf ++ grep -v '^#' debconf.conf > $(DESTDIR)$(PREFIX)/share/debconf/debconf.conf + # Make module directories. + find Debconf -type d |grep -v CVS | \ +- xargs -i install -d $(prefix)/$(PERL_VENDORLIB)/{} ++ xargs -i install -d $(DESTDIR)/$(PERL_VENDORLIB)/{} + # Install modules. + find Debconf -type f -name '*.pm' |grep -v CVS | \ +- xargs -i install -m 0644 {} $(prefix)/$(PERL_VENDORLIB)/{} ++ xargs -i install -m 0644 {} $(DESTDIR)/$(PERL_VENDORLIB)/{} + # Special case for back-compatability. +- install -d $(prefix)/$(PERL_VENDORLIB)/Debian/DebConf/Client ++ install -d $(DESTDIR)/$(PERL_VENDORLIB)/Debian/DebConf/Client + cp Debconf/Client/ConfModule.stub \ +- $(prefix)/$(PERL_VENDORLIB)/Debian/DebConf/Client/ConfModule.pm ++ $(DESTDIR)/$(PERL_VENDORLIB)/Debian/DebConf/Client/ConfModule.pm + # Other libs and helper stuff. +- install -m 0644 confmodule.sh confmodule $(prefix)/usr/share/debconf/ +- install frontend $(prefix)/usr/share/debconf/ +- install -m 0755 transition_db.pl fix_db.pl $(prefix)/usr/share/debconf/ ++ install -m 0644 confmodule.sh confmodule $(DESTDIR)$(PREFIX)/share/debconf/ ++ install frontend $(DESTDIR)$(PREFIX)/share/debconf/ ++ install -m 0755 transition_db.pl fix_db.pl $(DESTDIR)$(PREFIX)/share/debconf/ + # Install essential programs. +- install -d $(prefix)/usr/sbin $(prefix)/usr/bin ++ install -d $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/bin + find . -maxdepth 1 -perm /100 -type f -name 'dpkg-*' | \ +- xargs -i install {} $(prefix)/usr/sbin ++ xargs -i install {} $(DESTDIR)$(PREFIX)/sbin + find . -maxdepth 1 -perm /100 -type f -name debconf -or -name debconf-show -or -name debconf-copydb -or -name debconf-communicate -or -name debconf-set-selections -or -name debconf-apt-progress -or -name debconf-escape | \ +- xargs -i install {} $(prefix)/usr/bin ++ xargs -i install {} $(DESTDIR)$(PREFIX)/bin + # Now strip all pod documentation from all .pm files and scripts. +- find $(prefix)/$(PERL_VENDORLIB)/ $(prefix)/usr/sbin \ +- $(prefix)/usr/share/debconf/frontend \ +- $(prefix)/usr/share/debconf/*.pl $(prefix)/usr/bin \ +- -name '*.pl' -or -name '*.pm' -or -name 'dpkg-*' -or \ +- -name 'debconf-*' -or -name 'frontend' | \ ++ find $(DESTDIR)/$(PERL_VENDORLIB)/ $(DESTDIR)$(PREFIX)/sbin \ ++ $(DESTDIR)$(PREFIX)/share/debconf/frontend \ ++ $(DESTDIR)$(PREFIX)/share/debconf/*.pl $(DESTDIR)$(PREFIX)/bin \ ++ -name '*.pl' -or -name '*.pm' -or -name 'dpkg-*' -or \ ++ -name 'debconf-*' -or -name 'frontend' | \ + grep -v Client/ConfModule | $(MUNGE) +- find $(prefix) -name '*.bak' | xargs rm -f ++ find $(DESTDIR) -name '*.bak' | xargs rm -f + + demo: + PERL5LIB=. ./frontend samples/demo + +--- a/po/Makefile ++++ b/po/Makefile +@@ -4,14 +4,15 @@ + + POFILES=$(wildcard *.po) + MOFILES=$(POFILES:.po=.mo) ++PREFIX=/usr + + all: debconf.pot $(MOFILES) + + install: all + for file in $(MOFILES); do \ + lang=`echo $$file | sed 's/\.mo//'`; \ +- install -d $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/; \ +- install -m 0644 $$file $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/debconf.mo; \ ++ install -d $(DESTDIR)$(PREFIX)/share/locale/$$lang/LC_MESSAGES/; \ ++ install -m 0644 $$file $(DESTDIR)$(PREFIX)/share/locale/$$lang/LC_MESSAGES/debconf.mo; \ + done + + debconf.pot: $(POTFILES) + +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -1,6 +1,7 @@ + all: manpages + ./graph.pl `find .. -name \*.pm` > hierarchy.txt + ++PREFIX=/usr + pod2man=pod2man -c Debconf -r '' --utf8 + manpages: + cd man && po4a po4a/po4a.cfg +@@ -18,6 +19,13 @@ + xargs -i sh -c "cd .. ; $(pod2man) --section=1 {} > doc/man/gen/{}.1" + find .. -maxdepth 1 -perm /100 -type f -name 'dpkg-*' -printf '%P\n' | \ + xargs -i sh -c "cd .. ; $(pod2man) --section=8 {} > doc/man/gen/{}.8" ++ ++install: ++ install -d $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)$(PREFIX)/share/man/man3 $(DESTDIR)$(PREFIX)/share/man/man8 ++ ++ for num in 1 3 8; do \ ++ find man/gen/ -type f -not -name "*.*.*" -name "*.$$num" -exec cp --target-directory=$(DESTDIR)$(PREFIX)/share/man/man$$num/ {} +; \ ++ done + + clean: + cd man && po4a --rm-translations po4a/po4a.cfg |