# spec file for package lorikeet (Version 0.0.1) # # Copyright (c) 2004 Volker Lendecke # Copyright (c) 2004 Andrew Bartlett # packaged by Volker Lendecke # based on work by Guenther Deschner %define bind_version 9.2.3 %define openldap_version 2.2.5 %define heimdal_version 20040215 %define heimdal_samba_patch_revision -4 %define cyrus_sasl_version 2.1.17 Name: lorikeet License: GPL / OpenLDAP / BSD Group: Productivity/Networking/Samba URL: http://samba.sernet.de/lorikeet Vendor: Service Network GmbH, Goettingen Distribution: SuSE 9 (i386) Packager: Volker Lendecke Provides: lorikeet Autoreqprov: on Version: 0.0.1 Release: 1 Summary: A testbed for ideas BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: lorikeet-%{version}.tar.bz2 Source1: openldap-%{openldap_version}.tar.bz2 Source2: ftp://ftp.pdc.kth.se/pub/heimdal/src/snapshots/heimdal-%{heimdal_version}.tar.gz Source3: cyrus-sasl-%{cyrus_sasl_version}.tar.bz2 #Source4: bind-%{bind_version}.tar.gz Patch0: ntlm_sasl.diff Patch1: heimdal-%{heimdal_version}%{heimdal_samba_patch_revision}-samba.patch Prefix: /opt/lorikeet BuildPrereq: automake, autoconf >= 2.50, /bin/sh %define cyrus_plugindir %{prefix}/lib/sasl2 %define _libdir %{prefix}/lib %define _mandir %{prefix}/man %define strip 1 %description LORIKEET is a package to test new ideas. %prep [ $RPM_BUILD_ROOT = "/" ] && (echo "your buildroot is /" && exit 0) || rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}/opt %setup -n lorikeet-%{version} # untar openldap %setup -T -D -a 1 -n lorikeet-%{version} # untar heimdal %setup -T -D -a 2 -n lorikeet-%{version} pushd heimdal-%{heimdal_version} %patch1 -p1 -b .heimdal-samba popd # untar cyrus sasl %setup -T -D -a 3 -n lorikeet-%{version} ## untar bind #%setup -T -D -a 4 -n lorikeet-%{version} pushd cyrus-sasl-%{cyrus_sasl_version} %patch0 -p0 -b .ntlm-spengo # Remove the mismatching AC_PROG_LIBTOOL definition and its ltconfig. > acinclude.m4 rm config/ltconfig libtoolize -f -c aclocal -I config -I cmulocal automake -a -c -f autoheader autoconf -f pushd saslauthd rm config/ltconfig libtoolize -f -c aclocal -I config -I ../cmulocal -I ../config automake -a -c -f autoheader autoconf -f popd popd %build # lorikeet-%{version} #text -d %{prefix} && (echo "%{prefix} exists -- exiting"; exit) # Build heimdal pushd heimdal-%{heimdal_version} autoreconf --force --install #We don't want later things to use the heimdal client we are building here. ./configure --enable-shared --prefix=%{prefix} \ --libdir=%{prefix}/heimdal/lib --libdir=%{prefix}/heimdal/include --with-x \ --mandir=%{_mandir} --infodir=%{prefix}/info \ --libexecdir=%{prefix}/libexec \ --with-readline-include=/usr/include/readline \ --with-readline-lib=/usr/lib --with-openldap=/usr make popd ## Build bind # #pushd bind-%{bind_version} #./configure --prefix=%{prefix} --libdir=%{_libdir} --mandir=%{_mandir} #make #popd # Build cyrus sasl pushd cyrus-sasl-%{cyrus_sasl_version} ./configure --prefix=%{prefix} --prefix=%{prefix} --libdir=%{_libdir} \ --mandir=%{_mandir} --enable-gssspnego --enable-ntlm \ --with-devrandom=/dev/urandom \ --with-plugindir=%{cyrus_plugindir} \ --enable-static --with-pic --enable-shared --disable-java make sasldir=%{cyrus_plugindir} make -C saslauthd testsaslauthd make DESTDIR=$RPM_BUILD_ROOT sasldir=$RPM_BUILD_ROOT/%{cyrus_plugindir} install make install popd # Build OpenLDAP LDFLAGS="-L%{prefix}/lib"; export LDFLAGS CPPFLAGS="-I%{prefix}/include"; export CPPFLAGS CFLAGS="-I%{prefix}/include $RPM_OPT_FLAGS"; export CFLAGS pushd openldap-%{openldap_version} ./configure --with-cyrus-sasl=yes --enable-slapi --disable-bdb --enable-spasswd --enable-cleartext --enable-crypt \ --enable-ldbm --prefix=%{prefix} --enable-dynamic --enable-modules \ --libdir=%{_libdir} --mandir=%{_mandir} make depend make make DESTDIR=$RPM_BUILD_ROOT install popd # Ok, finally build our own stuff ! :-) pushd slapi/rootdse make CPPFLAGS=-I$RPM_BUILD_ROOT/%{prefix}/include popd %install pushd heimdal-%{heimdal_version} mkdir -p $RPM_BUILD_ROOT%{prefix}/bin mkdir -p $RPM_BUILD_ROOT%{prefix}/sbin mkdir -p $RPM_BUILD_ROOT%{prefix}/lib mkdir -p $RPM_BUILD_ROOT%{prefix}/include make DESTDIR=$RPM_BUILD_ROOT install popd #pushd bind-%{bind_version} #make DESTDIR=$RPM_BUILD_ROOT install #popd pushd slapi/rootdse install -m 755 rootdse.so $RPM_BUILD_ROOT%{prefix}/lib popd #Misc binaries for Cyrus-SASL pushd cyrus-sasl-%{cyrus_sasl_version} install -m755 -d $RPM_BUILD_ROOT%{_bindir} libtool --mode=install \ install -m755 sample/client $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-client libtool --mode=install \ install -m755 sample/server $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-server libtool --mode=install \ install -m755 saslauthd/testsaslauthd $RPM_BUILD_ROOT%{_sbindir}/testsaslauthd libtool --mode=install \ install -m755 utils/dbconverter-2 $RPM_BUILD_ROOT%{_sbindir}/dbconverter-2 # Install the saslauthd mdoc page in the expected location. Sure, it's not # really a man page, but groff seems to be able to cope with it. install -m755 -d $RPM_BUILD_ROOT%{_mandir}/man8/ install -m644 saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8 popd # Config-Files for LDAP cp conf/slapd.conf ${RPM_BUILD_ROOT}%{prefix}/etc/openldap cp conf/lorikeet.schema ${RPM_BUILD_ROOT}%{prefix}/etc/openldap/schema # Config-Files for Bind #cp conf/named.conf ${RPM_BUILD_ROOT}%{prefix}/etc #cp conf/rndc.conf ${RPM_BUILD_ROOT}%{prefix}/etc %if %{strip} find ${RPM_BUILD_ROOT}%{prefix}/bin ${RPM_BUILD_ROOT}%{prefix}/sbin \ ${RPM_BUILD_ROOT}%{prefix}/libexec -size +100k | xargs strip %endif %files %config %{prefix}/etc/openldap/slapd.conf %config %{prefix}/etc/openldap/ldap.conf %config %{prefix}/etc/named.conf %config %{prefix}/etc/rndc.conf %{prefix}/bin/* %{prefix}/sbin/* %{prefix}/include/* %{prefix}/lib/sasl2 %{prefix}/lib/sasl2/* %{prefix}/lib/* %{prefix}/libexec/* %{prefix}/share/openldap/ucdata/* %dir %{prefix}/var %doc %{prefix}/info/* %doc %{prefix}/man %{prefix}/etc/openldap/slapd.conf.default %{prefix}/etc/openldap/ldap.conf.default %doc %{prefix}/etc/openldap/schema