[23068] | 1 | #!/bin/sh |
---|
| 2 | set -e |
---|
| 3 | |
---|
| 4 | name=alpine |
---|
| 5 | daversionappend=debathena1 |
---|
| 6 | |
---|
| 7 | dir=$(cd "$(dirname "$0")"; pwd) |
---|
| 8 | |
---|
| 9 | hack_package () { |
---|
| 10 | add_build_depends libhesiod-dev |
---|
| 11 | add_build_depends libkrb5-dev |
---|
| 12 | |
---|
| 13 | # alpine versions prior to 1.10 have broken krb5 detection. |
---|
| 14 | # Versions prior to 1.0 can be patched in a similar fashion (though |
---|
| 15 | # not with exactly the same patch) but we're not currently |
---|
| 16 | # integrating those. |
---|
| 17 | case $version in |
---|
| 18 | 1.0*) patch -p1 < $dir/alpine-1.00-krb5-configure.patch ;; |
---|
| 19 | esac |
---|
| 20 | |
---|
| 21 | # Integrate krb4 support. |
---|
| 22 | tar -C imap/src -xzf "$dir/kerberos4-patches.tar.Z" |
---|
| 23 | patch -p1 < $dir/alpine-1.00-krb4-build.patch |
---|
| 24 | echo 'DEFAULTAUTHENTICATORS+=krb' >> imap/src/osdep/unix/Makefile |
---|
| 25 | |
---|
| 26 | # Ensure newly created mail directories in AFS are private. |
---|
| 27 | patch -p1 < $dir/alpine-1.00-creatdir.patch |
---|
| 28 | |
---|
| 29 | # Integrate Hesiod support. |
---|
| 30 | patch -p1 < $dir/alpine-1.00-hesiod.patch |
---|
| 31 | |
---|
| 32 | # Turn on Hesiod and krb4 suppport in the build. |
---|
[23218] | 33 | configure_flags='alpine_c_client_cflags="-DHESIOD -DKERBEROS" alpine_c_client_ldflags="-lhesiod" LIBS="-lhesiod -lkrb4"' |
---|
| 34 | if grep -Fq DEB_CONFIGURE_EXTRA_FLAGS debian/rules; then |
---|
| 35 | echo "DEB_CONFIGURE_EXTRA_FLAGS += $configure_flags" >> debian/rules |
---|
| 36 | else |
---|
| 37 | perl -0pe "s|./configure|./configure $configure_flags|m or die" -i debian/rules |
---|
| 38 | fi |
---|
[23068] | 39 | append_description <<EOF |
---|
| 40 | . |
---|
| 41 | This package was rebuilt for the Debian-Athena project to add Hesiod |
---|
| 42 | support, to add krb4 IMAP support, and to ensure that newly-created |
---|
| 43 | mail directories in AFS are private. |
---|
| 44 | EOF |
---|
| 45 | add_changelog 'Add Hesiod support.' |
---|
| 46 | add_changelog 'Add krb4 IMAP support.' |
---|
| 47 | add_changelog 'Make newly-created mail directories private in AFS.' |
---|
| 48 | add_debathena_provides |
---|
| 49 | munge_sections |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | # dapper has no alpine package. |
---|
| 53 | # etch has an alpine package in backports (which we're not currently |
---|
| 54 | # set up to use). |
---|
| 55 | # feisty has a package based on 0.82. gutsy has one based on 0.99, |
---|
| 56 | # with a 1.0 one in backports. Both would require additional build |
---|
| 57 | # system work to integrate due to differences in how they handle |
---|
| 58 | # CFLAGS for c-client. |
---|
| 59 | case $1 in |
---|
| 60 | etch-*|dapper-*) |
---|
| 61 | echo "No alpine package for $1; skipping" |
---|
| 62 | exit |
---|
| 63 | ;; |
---|
| 64 | feisty-*|gutsy-*) |
---|
| 65 | echo "alpine package too broken for $1; skipping" |
---|
| 66 | exit |
---|
| 67 | ;; |
---|
| 68 | esac |
---|
| 69 | |
---|
| 70 | . ../common/debathenificator.sh |
---|