rpms/samba4/devel samba4.spec,1.6,1.7
Simo Sorce
simo at fedoraproject.org
Thu Mar 5 03:44:50 UTC 2009
Author: simo
Update of /cvs/pkgs/rpms/samba4/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2516
Modified Files:
samba4.spec
Log Message:
* Wed Mar 4 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-9alpha7
- Make talloc,tdb,tevent,ldb easy to exclude using defines
- Fix package for non-mock "dirty" systems by deleting additional
files we are not interested in atm
Index: samba4.spec
===================================================================
RCS file: /cvs/pkgs/rpms/samba4/devel/samba4.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- samba4.spec 4 Mar 2009 13:46:46 -0000 1.6
+++ samba4.spec 5 Mar 2009 03:44:20 -0000 1.7
@@ -1,4 +1,4 @@
-%define main_release 8
+%define main_release 9
%define samba4_version 4.0.0
%define talloc_version 1.2.0
@@ -25,6 +25,10 @@
%define enable_common 0
%define enable_python 0
%define enable_winbind 0
+%define enable_talloc 1
+%define enable_tdb 1
+%define enable_tevent 1
+%define enable_ldb 1
# Install libraries not needed by OpenChange.
%define all_libraries 0
@@ -164,6 +168,7 @@
domains and to use Windows user and group accounts on Linux.
%endif
+%if %enable_talloc
%package -n libtalloc
Group: Development/Libraries
Summary: A hierarchical allocator
@@ -173,6 +178,18 @@
%description -n libtalloc
A library that implements a hierarchical allocator with destructors.
+%package -n libtalloc-devel
+Group: Development/Libraries
+Summary: Developer tools for the Talloc library
+Version: %{talloc_version}
+Release: %{talloc_release}
+Requires: libtalloc = %{talloc_version}-%{talloc_release}
+
+%description -n libtalloc-devel
+Header files needed to develop programs that link against the Talloc library.
+%endif
+
+%if %enable_tdb
%package -n libtdb
Group: Development/Libraries
Summary: A bdb like database engine
@@ -192,6 +209,18 @@
%description -n tdb-tools
Tools to manage TDB files
+%package -n libtdb-devel
+Group: Development/Libraries
+Summary: Developer tools for the TDB library
+Version: %{tdb_version}
+Release: %{tdb_release}
+Requires: libtdb = %{tdb_version}-%{tdb_release}
+
+%description -n libtdb-devel
+Header files needed to develop programs that link against the TDB library.
+%endif
+
+%if %enable_tevent
%package -n libtevent
Group: Development/Libraries
Summary: An event system library
@@ -203,6 +232,19 @@
A library that implements an event driven system, that uses epoll/select to
fire events when file status changes, supports also timer events.
+%package -n libtevent-devel
+Group: Development/Libraries
+Summary: Developer tools for the tevent library
+Version: %{tevent_version}
+Release: %{tevent_release}
+Requires: libtevent = %{tevent_version}-%{tevent_release}
+Requires: libtalloc-devel >= %{talloc_version}
+
+%description -n libtevent-devel
+Header files needed to develop programs that link against the tevent library.
+%endif
+
+%if %enable_ldb
%package -n libldb
Group: Development/Libraries
Summary: A schema-less, ldap like, API and database
@@ -226,37 +268,6 @@
%description -n ldb-tools
Tools to manage LDB files
-%package -n libtalloc-devel
-Group: Development/Libraries
-Summary: Developer tools for the Talloc library
-Version: %{talloc_version}
-Release: %{talloc_release}
-Requires: libtalloc = %{talloc_version}-%{talloc_release}
-
-%description -n libtalloc-devel
-Header files needed to develop programs that link against the Talloc library.
-
-%package -n libtdb-devel
-Group: Development/Libraries
-Summary: Developer tools for the TDB library
-Version: %{tdb_version}
-Release: %{tdb_release}
-Requires: libtdb = %{tdb_version}-%{tdb_release}
-
-%description -n libtdb-devel
-Header files needed to develop programs that link against the TDB library.
-
-%package -n libtevent-devel
-Group: Development/Libraries
-Summary: Developer tools for the tevent library
-Version: %{tevent_version}
-Release: %{tevent_release}
-Requires: libtevent = %{tevent_version}-%{tevent_release}
-Requires: libtalloc-devel >= %{talloc_version}
-
-%description -n libtevent-devel
-Header files needed to develop programs that link against the tevent library.
-
%package -n libldb-devel
Group: Development/Libraries
Summary: Developer tools for the LDB library
@@ -269,6 +280,7 @@
%description -n libldb-devel
Header files needed to develop programs that link against the LDB library.
+%endif
%prep
%setup -q -n %{tarball_name}
@@ -287,10 +299,18 @@
# build would fail if it finds standalone bits already built
mkdir -p standalone/lib
cp -a lib/replace standalone/lib/replace
+%if %enable_talloc
cp -a lib/talloc standalone/lib/talloc
+%endif
+%if %enable_tdb
cp -a lib/tdb standalone/lib/tdb
+%endif
+%if %enable_tevent
cp -a lib/tevent standalone/lib/tevent
+%endif
+%if %enable_ldb
cp -a source4/lib/ldb standalone/lib/ldb
+%endif
%build
%define shared_build_dir %{_sourcedir}/standalone/sbtmp
@@ -300,32 +320,40 @@
export CFLAGS="$CFLAGS -I%{shared_build_dir}/include"
# talloc
+%if %enable_talloc
pushd standalone/lib/talloc
./autogen.sh
%configure --with-shared-build-dir=%{shared_build_dir}
make shared-build %{?_smp_mflags}
popd
+%endif
# tdb
+%if %enable_tdb
pushd standalone/lib/tdb
./autogen.sh
%configure --with-shared-build-dir=%{shared_build_dir}
make shared-build %{?_smp_mflags}
popd
+%endif
# tevent
+%if %enable_tevent
pushd standalone/lib/tevent
./autogen.sh
%configure --with-shared-build-dir=%{shared_build_dir}
make shared-build %{?_smp_mflags}
popd
+%endif
# ldb
+%if %enable_ldb
pushd standalone/lib/ldb
./autogen.sh
%configure --with-shared-build-dir=%{shared_build_dir}
make shared-build # %{?_smp_mflags} XXX Causes build failure on F10
popd
+%endif
export LD_LIBRARY_PATH=$SAVE_LDLPATH
export CFLAGS=$SAVE_CFLAGS
@@ -428,7 +456,8 @@
rm $RPM_BUILD_ROOT%{_bindir}/setnttoken
rm $RPM_BUILD_ROOT%{_bindir}/smbtorture
rm $RPM_BUILD_ROOT%{_bindir}/subunitrun
-rm $RPM_BUILD_ROOT%{_bindir}/tdbtorture
+#depending on the environemnt this file might or might not be generated
+rm -f $RPM_BUILD_ROOT%{_bindir}/tdbtorture
# Avoids a file conflict with perl-Parse-Yapp.
rm -rf $RPM_BUILD_ROOT%{perl_vendorlib}/Parse/Yapp
@@ -446,15 +475,7 @@
rm $RPM_BUILD_ROOT%{_bindir}/cifsdd
%endif
%if ! %enable_common
-rm $RPM_BUILD_ROOT%{_bindir}/ad2oLschema
rm $RPM_BUILD_ROOT%{_bindir}/net
-rm $RPM_BUILD_ROOT%{_bindir}/ldbadd
-rm $RPM_BUILD_ROOT%{_bindir}/ldbdel
-rm $RPM_BUILD_ROOT%{_bindir}/ldbedit
-rm $RPM_BUILD_ROOT%{_bindir}/ldbmodify
-rm $RPM_BUILD_ROOT%{_bindir}/ldbrename
-rm $RPM_BUILD_ROOT%{_bindir}/ldbsearch
-rm $RPM_BUILD_ROOT%{_bindir}/oLschema2ldif
rm $RPM_BUILD_ROOT%{_bindir}/regdiff
rm $RPM_BUILD_ROOT%{_bindir}/regpatch
rm $RPM_BUILD_ROOT%{_bindir}/regshell
@@ -470,7 +491,6 @@
rm $RPM_BUILD_ROOT%{_libdir}/libregistry.so.*
rm $RPM_BUILD_ROOT%{_libdir}/libtorture.so
rm $RPM_BUILD_ROOT%{_libdir}/libtorture.so.*
-rm $RPM_BUILD_ROOT%{_libdir}/libldb.so.*
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/dcerpc_atsvc.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gensec.pc
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/registry.pc
@@ -479,31 +499,54 @@
rm $RPM_BUILD_ROOT%{_includedir}/samba-4.0/registry.h
%endif
+# the samba4 build process rebuilds libraries internally,
+# but we want to use the standalone build for now.
+rm $RPM_BUILD_ROOT%{_libdir}/libldb.so*
+rm $RPM_BUILD_ROOT%{_bindir}/ad2oLschema
+rm $RPM_BUILD_ROOT%{_bindir}/ldbadd
+rm $RPM_BUILD_ROOT%{_bindir}/ldbdel
+rm $RPM_BUILD_ROOT%{_bindir}/ldbedit
+rm $RPM_BUILD_ROOT%{_bindir}/ldbmodify
+rm $RPM_BUILD_ROOT%{_bindir}/ldbrename
+rm $RPM_BUILD_ROOT%{_bindir}/ldbsearch
+rm $RPM_BUILD_ROOT%{_bindir}/oLschema2ldif
+rm -f $RPM_BUILD_ROOT%{_bindir}/tdbbackup
+rm -f $RPM_BUILD_ROOT%{_bindir}/tdbdump
+rm -f $RPM_BUILD_ROOT%{_bindir}/tdbtool
+
+
# talloc
+%if %enable_talloc
pushd standalone/lib/talloc
make install DESTDIR=$RPM_BUILD_ROOT
ln -s libtalloc.so.%{talloc_version} $RPM_BUILD_ROOT%{_libdir}/libtalloc.so
-#rm -f $RPM_BUILD_ROOT/usr/share/swig/*/talloc.i || :
popd
+%endif
# tdb
+%if %enable_tdb
pushd standalone/lib/tdb
make install DESTDIR=$RPM_BUILD_ROOT
ln -s libtdb.so.%{tdb_version} $RPM_BUILD_ROOT%{_libdir}/libtdb.so
popd
+%endif
# tevent
+%if %enable_tevent
pushd standalone/lib/tevent
make install DESTDIR=$RPM_BUILD_ROOT
ln -s libtevent.so.%{tevent_version} $RPM_BUILD_ROOT%{_libdir}/libtevent.so
popd
+%endif
# ldb
+%if %enable_ldb
pushd standalone/lib/ldb
make install DESTDIR=$RPM_BUILD_ROOT
ln -s -f libldb.so.%{ldb_version} $RPM_BUILD_ROOT%{_libdir}/libldb.so
mkdir $RPM_BUILD_ROOT%{_libdir}/ldb
popd
+%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
@@ -512,6 +555,12 @@
rm -r $RPM_BUILD_ROOT%{python_libdir}/lib
%endif
+# These may be created in non mock systems, but we do not want to package them
+# for now
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ad2oLschema.1
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/oLschema2ldif.1
+rm -f $RPM_BUILD_ROOT/usr/share/swig/*/talloc.i
+
# This makes the right links, as rpmlint requires that
# the ldconfig-created links be recorded in the RPM.
/sbin/ldconfig -N -n $RPM_BUILD_ROOT%{_libdir}
@@ -554,29 +603,37 @@
%postun libs -p /sbin/ldconfig
+%if %enable_talloc
%post -n libtalloc
/sbin/ldconfig
%postun -n libtalloc
/sbin/ldconfig
+%endif
+%if %enable_tdb
%post -n libtdb
/sbin/ldconfig
%postun -n libtdb
/sbin/ldconfig
+%endif
+%if %enable_tevent
%post -n libtevent
/sbin/ldconfig
%postun -n libtevent
/sbin/ldconfig
+%endif
+%if %enable_ldb
%post -n libldb
/sbin/ldconfig
%postun -n libldb
/sbin/ldconfig
+%endif
%files
@@ -586,9 +643,6 @@
%{_sbindir}/samba
%{_bindir}/mymachinepw
%{_bindir}/smbstatus
-%{_bindir}/tdbbackup
-%{_bindir}/tdbdump
-%{_bindir}/tdbtool
%{_datadir}/samba/setup
%dir /var/lib/%{name}/sysvol
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
@@ -696,23 +750,23 @@
#%config(noreplace) %{_sysconfdir}/%{name}/smb.conf
%endif
+%if %enable_talloc
%files -n libtalloc
%defattr(-,root,root,-)
%{_libdir}/libtalloc.so.*
-%files -n libtdb
-%defattr(-,root,root,-)
-%{_libdir}/libtdb.so.*
-
-%files -n libtevent
+%files -n libtalloc-devel
%defattr(-,root,root,-)
-%{_libdir}/libtevent.so.*
+%{_includedir}/talloc.h
+%{_libdir}/libtalloc.so
+%{_libdir}/pkgconfig/talloc.pc
+%{_mandir}/man3/talloc.3.gz
+%endif
-%files -n libldb
+%if %enable_tdb
+%files -n libtdb
%defattr(-,root,root,-)
-%{_libdir}/libldb.so.*
-%dir %{_libdir}/ldb
-#%{_libdir}/ldb/*
+%{_libdir}/libtdb.so.*
%files -n tdb-tools
%defattr(-,root,root,-)
@@ -724,6 +778,32 @@
#%{_mandir}/man8/tdbdump.8*
#%{_mandir}/man8/tdbtool.8*
+%files -n libtdb-devel
+%defattr(-,root,root,-)
+%{_includedir}/tdb.h
+%{_libdir}/libtdb.so
+%{_libdir}/pkgconfig/tdb.pc
+%endif
+
+%if %enable_tevent
+%files -n libtevent
+%defattr(-,root,root,-)
+%{_libdir}/libtevent.so.*
+
+%files -n libtevent-devel
+%defattr(-,root,root,-)
+%{_includedir}/tevent.h
+%{_libdir}/libtevent.so
+%{_libdir}/pkgconfig/tevent.pc
+%endif
+
+%if %enable_ldb
+%files -n libldb
+%defattr(-,root,root,-)
+%{_libdir}/libldb.so.*
+%dir %{_libdir}/ldb
+#%{_libdir}/ldb/*
+
%files -n ldb-tools
%defattr(-,root,root,-)
%{_bindir}/ldbadd
@@ -742,25 +822,6 @@
#%{_mandir}/man1/ad2oLschema.1.gz
#%{_mandir}/man1/oLschema2ldif.1.gz
-%files -n libtalloc-devel
-%defattr(-,root,root,-)
-%{_includedir}/talloc.h
-%{_libdir}/libtalloc.so
-%{_libdir}/pkgconfig/talloc.pc
-%{_mandir}/man3/talloc.3.gz
-
-%files -n libtdb-devel
-%defattr(-,root,root,-)
-%{_includedir}/tdb.h
-%{_libdir}/libtdb.so
-%{_libdir}/pkgconfig/tdb.pc
-
-%files -n libtevent-devel
-%defattr(-,root,root,-)
-%{_includedir}/tevent.h
-%{_libdir}/libtevent.so
-%{_libdir}/pkgconfig/tevent.pc
-
%files -n libldb-devel
%defattr(-,root,root,-)
%{_includedir}/ldb_module.h
@@ -770,8 +831,14 @@
%{_libdir}/libldb.so
%{_libdir}/pkgconfig/ldb.pc
%{_mandir}/man3/ldb.3.gz
+%endif
%changelog
+* Wed Mar 4 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-9alpha7
+- Make talloc,tdb,tevent,ldb easy to exclude using defines
+- Fix package for non-mock "dirty" systems by deleting additional
+ files we are not interested in atm
+
* Wed Mar 4 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-8alpha7
- Fix typo in Requires
More information about the fedora-extras-commits
mailing list