Magellan Linux

Contents of /trunk/extras/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21013 - (show annotations) (download)
Mon Mar 3 16:52:54 2014 UTC (10 years, 2 months ago) by niro
File size: 3503 byte(s)
-moved to 'extras'
1 # $Id$
2
3 PNAME="cyrus-sasl"
4 PVER="2.1.26"
5 PBUILD="r1"
6
7 PCAT="dev-libs"
8
9 DESCRIPTION="The Cyrus Simple Authentication and Security Layer."
10 HOMEPAGE="http://asg.web.cmu.edu/sasl/"
11
12 DEPEND=">= virtual/glibc
13 >= dev-libs/openssl-1.0.1
14 >= sys-libs/pam-1.1"
15
16 SDEPEND=">= virtual/sed
17 >= sys-dev/autoconf-8
18 >= sys-dev/automake-4
19 >= sys-dev/libtool-2"
20
21 SRCFILE="${PNAME}-${PVER}.tar.gz"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 sminclude mtools
25
26 SRC_URI=(
27 ftp://ftp.cyrusimap.org/${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/${PNAME}-2.1.22-qa.patch
30 mirror://${PNAME}/${PNAME}-${PVER}-size_t.patch
31 mirror://${PNAME}/${PNAME}-${PVER}-maintainer_mode.patch
32 mirror://${PNAME}/${PNAME}-${PVER}-saslauthd_ac_prog_libtool.patch
33 mirror://${PNAME}/${PNAME}-${PVER}-ld_as_needed.patch
34 mirror://${PNAME}/${PNAME}-${PVER}-drop_krb5support_dependency.patch
35 mirror://${PNAME}/${PNAME}-${PVER}-dont_use_la_files_for_opening_plugins.patch
36 mirror://${PNAME}/${PNAME}-${PVER}-CVE-2013-4122.patch
37 mirror://${PNAME}/${PNAME}-${PVER}-sql-rpath.patch
38 )
39
40 UP2DATE="updatecmd ftp://ftp.cyrusimap.org/${PNAME}/ | grep ${PNAME}- | grep -v rc | lasttarball gz"
41
42 src_prepare()
43 {
44 munpack ${SRCFILE}
45 cd ${SRCDIR}
46
47 # fix prototype warings
48 mpatch ${PNAME}-2.1.22-qa.patch || die
49 mpatch ${PNAME}-${PVER}-size_t.patch || die
50 # fix autoconf issues
51 mpatch ${PNAME}-${PVER}-maintainer_mode.patch || die
52 # use libtool
53 mpatch ${PNAME}-${PVER}-saslauthd_ac_prog_libtool.patch || die
54 # fix as-needed issues
55 mpatch ${PNAME}-${PVER}-ld_as_needed.patch || die
56 # do not depend on krb5
57 mpatch ${PNAME}-${PVER}-drop_krb5support_dependency.patch || die
58 # only use so names
59 mpatch ${PNAME}-${PVER}-dont_use_la_files_for_opening_plugins.patch || die
60 # security fix
61 mpatch ${PNAME}-${PVER}-CVE-2013-4122.patch || die
62 # fix sql rpathes
63 mpatch ${PNAME}-${PVER}-sql-rpath.patch || die
64
65 # use newer macro names
66 sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die
67 sed -i 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' configure.in saslauthd/configure.in || die
68
69 # upstream doesn't even honor their own configure options...
70 sed -i 's:^sasldir = .*$:sasldir = $(plugindir):' ${SRCDIR}/plugins/Makefile.{am,in} || die
71
72 # recreate configure
73 rm -f {saslauthd/,}config/config.guess {saslauthd/,}config/config.sub || die
74 rm -f {saslauthd/,}config/ltconfig {saslauthd/,}config/ltmain.sh {saslauthd/,}config/libtool.m4 || die
75 rm -fr {saslauthd/,}autom4te.cache || die
76 mlibtoolize || die
77 pushd saslauthd
78 mlibtoolize || die
79 popd
80 # use full pathes or automake fails in subdirs
81 mautoreconf -I $(pwd)/cmulocal -I config || die
82 }
83
84 src_compile()
85 {
86 cd ${SRCDIR}
87
88 mconfigure \
89 --with-saslauthd=/var/lib/sasl2 \
90 --with-pwcheck=/var/lib/sasl2 \
91 --with-configdir=/etc/sasl2 \
92 --with-plugindir=/usr/$(mlibdir)/sasl2 \
93 --with-dbpath=/etc/sasl2/sasldb2 \
94 --enable-login \
95 --enable-ntlm \
96 --with-openssl \
97 --with-pam \
98 --disable-static \
99 --disable-krb4 \
100 --disable-otp \
101 --without-ldap \
102 --disable-ldapdb \
103 --disable-sample \
104 --disable-gssapi \
105 --without-mysql \
106 --disable-mysql \
107 --without-pgsql \
108 --disable-postgres \
109 --disable-sql \
110 --disable-srp \
111 --disable-java \
112 --without-authdaemond \
113 --with-dblib=none \
114 || die
115
116 mmake -j1 || die
117 }
118
119 src_install ()
120 {
121 cd ${SRCDIR}
122
123 mmake DESTDIR=${BINDIR} install || die
124
125 mkeepdir /var/lib/sasl2 || die
126 mkeepdir /etc/sasl2 || die
127
128 minstalldocs AUTHORS ChangeLog COPYING NEWS README doc/TODO doc/*.txt || die
129 }