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 |
2 | 3 | %include Solaris.inc |
3 | 4 | |
4 | 5 | %define _prefix /opt/TSopenldap |
— | — | @@ -12,12 +13,34 @@ |
13 | 14 | Requires: TSopenldap-root |
14 | 15 | %include default-depend.inc |
15 | 16 | |
| 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 | + |
16 | 24 | %package root |
17 | 25 | Summary: %{summary} - / filesystem |
18 | 26 | SUNW_BaseDir: / |
19 | 27 | |
| 28 | +%package devel |
| 29 | +Summary: %{summary} - development files |
| 30 | +SUNW_BaseDir: %{_basedir} |
| 31 | +%include default-depend.inc |
| 32 | +Requires: %name |
| 33 | + |
20 | 34 | %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} |
22 | 45 | |
23 | 46 | %build |
24 | 47 | |
— | — | @@ -29,20 +52,28 @@ |
30 | 53 | export CC="cc" |
31 | 54 | export CXX="CC" |
32 | 55 | export CFLAGS="%optflags" |
33 | | -export LDFLAGS="%{_ldflags} -R/usr/sfw/lib -L/usr/sfw/lib" |
| 56 | +export LDFLAGS="%{_ldflags}" |
34 | 57 | 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 |
39 | 58 | |
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} |
41 | 69 | |
42 | 70 | %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 |
44 | 76 | |
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} |
47 | 78 | |
48 | 79 | %clean |
49 | 80 | rm -rf $RPM_BUILD_ROOT |
— | — | @@ -50,14 +81,37 @@ |
51 | 82 | %files |
52 | 83 | %defattr (-, root, bin) |
53 | 84 | %dir %attr (0755, root, bin) %{_prefix}/bin |
| 85 | +%{_prefix}/bin/* |
54 | 86 | %dir %attr (0755, root, sys) %{_prefix}/lib |
| 87 | +%{_prefix}/lib/*.so.* |
55 | 88 | %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/* |
56 | 108 | %dir %attr (0755, root, sys) %{_prefix}/include |
57 | | -%{_prefix}/bin/* |
58 | | -%{_prefix}/lib/* |
59 | | -%{_prefix}/man/* |
60 | 109 | %{_prefix}/include/* |
61 | 110 | |
| 111 | +%ifarch amd64 sparcv9 |
| 112 | +%dir %attr (0755, root, sys) %{_prefix}/lib/%_arch64 |
| 113 | +%{_prefix}/lib/%_arch64/*.so |
| 114 | +%endif |
| 115 | + |
62 | 116 | %files root |
63 | 117 | %defattr (-, root, bin) |
64 | 118 | %dir %attr (0755, root, sys) /etc |