X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 50D7ADC0428 for ; Tue, 5 Apr 2016 09:55:40 +0000 (UTC) Received: from mx.mauras.ch (mx.mauras.ch [163.172.199.81]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 02096DC02A0 for ; Tue, 5 Apr 2016 09:55:39 +0000 (UTC) Received: from www.parentsbilingues.ch ([212.83.137.183]) by mx.mauras.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_2) (envelope-from ) id 1anNhx-0003XP-S6 for alpine-aports@lists.alpinelinux.org; Tue, 05 Apr 2016 11:55:37 +0200 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 05 Apr 2016 11:55:37 +0200 From: olivier@mauras.ch To: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] main/dovecot: Integrate pigeonhole plugin 0.4.13 as a subpackage In-Reply-To: <20160404092538.04145344@vostro.util.wtbts.net> References: <20160404025625.10d9cac7f8cb0e308f09041e@mauras.ch> <20160404092538.04145344@vostro.util.wtbts.net> Message-ID: X-Sender: olivier@mauras.ch User-Agent: Roundcube Webmail/1.1.4 X-Authenticated-Sender: olivier@mauras.ch X-Virus-Scanned: ClamAV using ClamSMTP Thanks for the details, I'll make the modifications. On 04.04.2016 08:25, Timo Teras wrote: > On Mon, 4 Apr 2016 02:56:25 +0200 > Olivier Mauras wrote: > >> Sieve support in dovecot requires the pigeonhole plugin. >> The plugin requires to be rebuilded each time dovecot minor version >> changes, so having it as a subpackage will make it easier. >> --- >> main/dovecot/APKBUILD | 50 >> ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 >> insertions(+), 2 deletions(-) >> >> diff --git a/main/dovecot/APKBUILD b/main/dovecot/APKBUILD >> index 2ba4986..c6c0392 100644 >> --- a/main/dovecot/APKBUILD >> +++ b/main/dovecot/APKBUILD >> @@ -4,7 +4,8 @@ >> # Maintainer: Natanael Copa >> pkgname=dovecot >> pkgver=2.2.22 >> -pkgrel=0 >> +pigeonholever=0.4.13 >> +pkgrel=1 >> pkgdesc="IMAP and POP3 server" >> url="http://www.dovecot.org/" >> arch="all" >> @@ -17,9 +18,10 @@ makedepends="libcap-dev zlib-dev openssl-dev >> bzip2-dev postgresql-dev install="dovecot.pre-install >> dovecot.post-install" subpackages="$pkgname-doc $pkgname-dev >> $pkgname-sql $pkgname-pgsql $pkgname-mysql $pkgname-sqlite >> - $pkgname-gssapi $pkgname-ldap >> + $pkgname-gssapi $pkgname-ldap $pkgname-pigeonhole >> " >> >> source="http://www.dovecot.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.gz >> + >> http://pigeonhole.dovecot.org/releases/2.2/$pkgname-2.2-pigeonhole-$pigeonholever.tar.gz >> hide-dl-errors.patch dovecot.logrotate >> dovecot.initd >> @@ -27,6 +29,7 @@ >> source="http://www.dovecot.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.gz >> options="libtool" >> _builddir="$srcdir"/$pkgname-$pkgver >> +_builddirpigeonhole="$srcdir"/$pkgname-2.2-pigeonhole-$pigeonholever >> >> prepare() { >> cd "$_builddir" >> @@ -105,6 +108,46 @@ dev() { >> "$subpkgdir"/usr/lib/dovecot/ >> } >> >> +pigeonhole() { >> + pkgdesc="Sieve plugin for dovecot" >> + depends="$pkgname" >> + >> + cd "$_builddirpigeonhole" >> + ./configure \ >> + --build=$CBUILD \ >> + --host=$CHOST \ >> + --prefix=/usr \ >> + --localstatedir=/var \ >> + --sysconfdir=/etc \ >> + --mandir=/usr/share/man \ >> + --infodir=/usr/share/info \ >> + --with-dovecot="$_builddir" \ >> + --disable-static \ >> + || return 1 >> + make || return 1 > > The build stage should go to build(). > >> + make install DESTDIR="$pkgdir" || return 1 > > And this to package(). > > One reason for these is that some functions are run under fakeroot and > some not. And that then the automatic split for -doc works (see below). > And it also helps developers if they are running these stages > individually. > > Otherwise it looks good to me. I'd also like to hear if dovecot > maintainer has any comments on doing this? > >> + >> + # Moving stuff before running _mv >> + mv "$pkgdir"/usr/share/doc/dovecot/example-config/conf.d/* \ >> + "$pkgdir"/etc/dovecot/conf.d \ >> + || return 1 >> + >> + # We keep includes, man and doc in main package >> + _mv $(cd "$pkgdir" && find usr -name '*sieve*' -prune \ >> + -a -not -regex ".*/include/.*" \ >> + -a -not -regex ".*/man/.*" \ >> + -a -not -regex ".*/doc/.*" \ >> + ) || return 1 >> + _mv $(cd "$pkgdir" && find usr -name '*pigeonhole*' \ >> + -a -not -regex ".*/include/.*" \ >> + -a -not -regex ".*/man/.*" \ >> + ) || return 1 >> + _mv $(cd "$pkgdir" && find etc/dovecot -name '*sieve*') || >> return 1 + >> + # Compress man pages >> + find "$pkgdir"/usr/share/man/ -name "*.1" -o -name "*.7" | >> xargs gzip -9 +} >> + > > The man pages should go to -doc. Then they are also compressed > manually. Another reason to use build() and package() correctly. > >> pgsql() { >> pkgdesc="postgresql driver for dovecot" >> depends="$pkgname-sql" >> @@ -144,14 +187,17 @@ sql() { >> } --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---