Magellan Linux

Contents of /branches/R11-stable/extras/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21007 - (show annotations) (download)
Mon Mar 3 16:18:23 2014 UTC (10 years, 2 months ago) by niro
Original Path: trunk/core/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2
File size: 3223 byte(s)
-disable maintainer mode
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 # use full pathes or automake fails in subdirs
74 mautoreconf -I $(pwd)/cmulocal -I $(pwd)/config || die
75 }
76
77 src_compile()
78 {
79 cd ${SRCDIR}
80
81 mconfigure \
82 --with-saslauthd=/var/lib/sasl2 \
83 --with-pwcheck=/var/lib/sasl2 \
84 --with-configdir=/etc/sasl2 \
85 --with-plugindir=/usr/$(mlibdir)/sasl2 \
86 --with-dbpath=/etc/sasl2/sasldb2 \
87 --enable-login \
88 --enable-ntlm \
89 --with-openssl \
90 --with-pam \
91 --disable-static \
92 --disable-krb4 \
93 --disable-otp \
94 --without-ldap \
95 --disable-ldapdb \
96 --disable-sample \
97 --disable-gssapi \
98 --without-mysql \
99 --disable-mysql \
100 --without-pgsql \
101 --disable-postgres \
102 --disable-sql \
103 --disable-srp \
104 --disable-java \
105 --without-authdaemond \
106 --with-dblib=none \
107 || die
108
109 mmake -j1 || die
110 }
111
112 src_install ()
113 {
114 cd ${SRCDIR}
115
116 mmake DESTDIR=${BINDIR} install || die
117
118 mkeepdir /var/lib/sasl2 || die
119 mkeepdir /etc/sasl2 || die
120
121 minstalldocs AUTHORS ChangeLog COPYING NEWS README doc/TODO doc/*.txt || die
122 }