r46500 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46499‎ | r46500 | r46501 >
Date:00:06, 29 January 2009
Author:river
Status:deferred
Tags:
Comment:
TSopenldap: build 64-bit libraries; don't package .la and .a files; split development files into TSopenldap-devel package
Modified paths:
  • /trunk/tools/ts-specs/TSopenldap.spec (modified) (history)
  • /trunk/tools/ts-specs/base-specs/openldap.spec (added) (history)

Diff [purge]

Index: trunk/tools/ts-specs/base-specs/openldap.spec
@@ -0,0 +1,37 @@
 2+%define _prefix /opt/TSopenldap
 3+
 4+Name: TSopenldap
 5+Summary: OpenLDAP client and libraries
 6+Version: 2.4.13
 7+Source: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
 8+
 9+SUNW_BaseDir: /opt/TSopenldap
 10+BuildRoot: %{_tmppath}/%{name}-%{version}-build
 11+
 12+%prep
 13+%setup -q -n openldap-%version
 14+
 15+%build
 16+
 17+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
 18+if test "x$CPUS" = "x" -o $CPUS = 0; then
 19+ CPUS=1
 20+fi
 21+
 22+./configure --prefix=%{_prefix} \
 23+ --disable-slapd --with-tls=openssl \
 24+ --sysconfdir=/etc/opt/TSopenldap \
 25+ --with-subdir=no \
 26+ --bindir=%{_bindir} \
 27+ --libdir=%{_libdir} \
 28+
 29+gmake -j$CPUS
 30+
 31+%install
 32+gmake install DESTDIR=$RPM_BUILD_ROOT
 33+rm $RPM_BUILD_ROOT/etc/opt/TSopenldap/ldap.conf
 34+rm $RPM_BUILD_ROOT/%{_libdir}/*.la
 35+rm $RPM_BUILD_ROOT/%{_libdir}/*.a
 36+
 37+%clean
 38+rm -rf $RPM_BUILD_ROOT
Index: trunk/tools/ts-specs/TSopenldap.spec
@@ -1,3 +1,4 @@
 2+%define _basedir /opt/TSopenldap
23 %include Solaris.inc
34
45 %define _prefix /opt/TSopenldap
@@ -12,12 +13,34 @@
1314 Requires: TSopenldap-root
1415 %include default-depend.inc
1516
 17+%ifarch amd64 sparcv9
 18+%include arch64.inc
 19+%use openldap64=openldap.spec
 20+%endif
 21+%include base.inc
 22+%use openldap = openldap.spec
 23+
1624 %package root
1725 Summary: %{summary} - / filesystem
1826 SUNW_BaseDir: /
1927
 28+%package devel
 29+Summary: %{summary} - development files
 30+SUNW_BaseDir: %{_basedir}
 31+%include default-depend.inc
 32+Requires: %name
 33+
2034 %prep
21 -%setup -q -n openldap-%version
 35+rm -rf %name-%version
 36+mkdir %name-%version
 37+
 38+%ifarch amd64 sparcv9
 39+mkdir %name-%version/%_arch64
 40+%openldap64.prep -d %name-%version/%_arch64
 41+%endif
 42+
 43+mkdir %name-%version/%{base_arch}
 44+%openldap.prep -d %name-%version/%{base_arch}
2245
2346 %build
2447
@@ -29,20 +52,28 @@
3053 export CC="cc"
3154 export CXX="CC"
3255 export CFLAGS="%optflags"
33 -export LDFLAGS="%{_ldflags} -R/usr/sfw/lib -L/usr/sfw/lib"
 56+export LDFLAGS="%{_ldflags}"
3457 export CPPFLAGS='-I/usr/sfw/include'
35 -./configure --prefix=%{_prefix} \
36 - --disable-slapd --with-tls=openssl \
37 - --sysconfdir=/etc/opt/TSopenldap \
38 - --with-subdir=no
3958
40 -gmake -j$CPUS
 59+%ifarch amd64 sparcv9
 60+%include arch64.inc
 61+export CFLAGS="%optflags -m64 -I/usr/sfw/include"
 62+export LDFLAGS="-m64 -L/usr/sfw/lib/%_arch64 -R/usr/sfw/lib/%_arch64"
 63+%openldap64.build -d %name-%version/%_arch64
 64+%endif
 65+%include base.inc
 66+export LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib"
 67+export CFLAGS="%optflags -I/usr/sfw/include"
 68+%openldap.build -d %name-%version/%{base_arch}
4169
4270 %install
43 -rm -rf $RPM_BUILD_ROOT
 71+%ifarch amd64 sparcv9
 72+%openldap64.install -d %name-%version/%_arch64
 73+%endif
 74+
 75+rm -rf $RPM_BUILD_ROOT/%{_bindir}/%_arch64
4476
45 -make install DESTDIR=$RPM_BUILD_ROOT
46 -rm $RPM_BUILD_ROOT/etc/opt/TSopenldap/ldap.conf
 77+%openldap.install -d %name-%version/%{base_arch}
4778
4879 %clean
4980 rm -rf $RPM_BUILD_ROOT
@@ -50,14 +81,37 @@
5182 %files
5283 %defattr (-, root, bin)
5384 %dir %attr (0755, root, bin) %{_prefix}/bin
 85+%{_prefix}/bin/*
5486 %dir %attr (0755, root, sys) %{_prefix}/lib
 87+%{_prefix}/lib/*.so.*
5588 %dir %attr (0755, root, sys) %{_prefix}/man
 89+%dir %attr (0755, root, sys) %{_prefix}/man/man1
 90+%{_prefix}/man/man1/*
 91+%dir %attr (0755, root, sys) %{_prefix}/man/man5
 92+%{_prefix}/man/man5/*
 93+%dir %attr (0755, root, sys) %{_prefix}/man/man8
 94+%{_prefix}/man/man8/*
 95+
 96+%ifarch amd64 sparcv9
 97+%dir %attr (0755, root, sys) %{_prefix}/lib/%_arch64
 98+%{_prefix}/lib/%_arch64/*.so.*
 99+%endif
 100+
 101+%files devel
 102+%defattr (-, root, bin)
 103+%dir %attr (0755, root, sys) %{_prefix}/lib
 104+%{_prefix}/lib/*.so
 105+%dir %attr (0755, root, sys) %{_prefix}/man
 106+%dir %attr (0755, root, sys) %{_prefix}/man/man3
 107+%{_prefix}/man/man3/*
56108 %dir %attr (0755, root, sys) %{_prefix}/include
57 -%{_prefix}/bin/*
58 -%{_prefix}/lib/*
59 -%{_prefix}/man/*
60109 %{_prefix}/include/*
61110
 111+%ifarch amd64 sparcv9
 112+%dir %attr (0755, root, sys) %{_prefix}/lib/%_arch64
 113+%{_prefix}/lib/%_arch64/*.so
 114+%endif
 115+
62116 %files root
63117 %defattr (-, root, bin)
64118 %dir %attr (0755, root, sys) /etc

Follow-up revisions

RevisionCommit summaryAuthorDate
r46504Fix for r46500 -- use the hook so it actually works.werdna00:37, 29 January 2009

Status & tagging log