diff options
author | Michael Adam <obnox@samba.org> | 2008-08-29 16:55:55 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-09-09 10:53:26 +0200 |
commit | e1ec833770fad237a718883e2d7c2114da1a6c34 (patch) | |
tree | b0b3e838ea918bf09b885a3e79e020002e9df49f /packaging | |
parent | 1db0255b80fe11f2c2c8d65f7ca79ea1e5a5f66a (diff) | |
download | samba-e1ec833770fad237a718883e2d7c2114da1a6c34.tar.gz samba-e1ec833770fad237a718883e2d7c2114da1a6c34.tar.bz2 samba-e1ec833770fad237a718883e2d7c2114da1a6c34.zip |
packaging(RHEL): fix libdir installation by using _libarch/_libarchdir
Michael
(This used to be commit 829f83c27ad03e4d2a7b5dc0b0459823fa4f3804)
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/RHEL/samba.spec.tmpl | 69 |
1 files changed, 39 insertions, 30 deletions
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl index 7a2f5c5c17..1b3bf19f56 100644 --- a/packaging/RHEL/samba.spec.tmpl +++ b/packaging/RHEL/samba.spec.tmpl @@ -33,6 +33,15 @@ BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-deve # Working around perl dependency problem from docs %define __perl_requires %{SOURCE998} +# rpm screws up the arch lib dir when using --target on RHEL5 +%ifarch i386 i486 i586 i686 ppc s390 +%define _libarch lib +%else +%define _libarch %_lib +%endif + +%define _libarchdir /usr/%{_libarch} + %description Samba is the protocol by which a lot of PC-related machines share @@ -127,8 +136,8 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ --prefix=%{_prefix} \ --localstatedir=/var \ --with-configdir=%{_sysconfdir}/samba \ - --libdir=%{_libdir} \ - --with-modulesdir=%{_libdir}/samba \ + --libdir=%{_libarchdir} \ + --with-modulesdir=%{_libarchdir}/samba \ --with-lockdir=/var/lib/samba \ --with-logfilebase=/var/log/samba \ --with-mandir=%{_mandir} \ @@ -186,9 +195,9 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/{help,include,using_samba/{figs,gifsa}} mkdir -p $RPM_BUILD_ROOT%{_includedir} mkdir -p $RPM_BUILD_ROOT%{_initrddir} -mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} -mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/{auth,charset,idmap,vfs,pdb} -mkdir -p $RPM_BUILD_ROOT/%{_lib}/security +mkdir -p $RPM_BUILD_ROOT{%{_libarchdir},%{_includedir}} +mkdir -p $RPM_BUILD_ROOT%{_libarchdir}/samba/{auth,charset,idmap,vfs,pdb} +mkdir -p $RPM_BUILD_ROOT/%{_libarch}/security mkdir -p $RPM_BUILD_ROOT%{_mandir} mkdir -p $RPM_BUILD_ROOT%{_prefix}/{bin,sbin} mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib @@ -207,30 +216,30 @@ make DESTDIR=$RPM_BUILD_ROOT \ cd .. # NSS & PAM winbind support -install -m 755 source/bin/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so -install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so -install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_lib}/libnss_wins.so -( cd $RPM_BUILD_ROOT/%{_lib}; +install -m 755 source/bin/pam_winbind.so $RPM_BUILD_ROOT/%{_libarch}/security/pam_winbind.so +install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_libarch}/libnss_winbind.so +install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_libarch}/libnss_wins.so +( cd $RPM_BUILD_ROOT/%{_libarch}; ln -sf libnss_winbind.so libnss_winbind.so.2; ln -sf libnss_wins.so libnss_wins.so.2 ) # make install puts libsmbclient.so in the wrong place on x86_64 rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libsmbclient.so $RPM_BUILD_ROOT/usr/lib*/samba/libsmbclient.a || true -install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so -install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a +install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libarchdir}/libsmbclient.so +install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libarchdir}/libsmbclient.a install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir} -ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so.0 +ln -s %{_libarchdir}/libsmbclient.so $RPM_BUILD_ROOT%{_libarchdir}/libsmbclient.so.0 # make install puts libsmbsharemodes.so in the wrong place on x86_64 rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libsmbsharemodes.so $RPM_BUILD_ROOT/usr/lib*/samba/libsmbsharemodes.a || true -install -m 755 source/bin/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.so -install -m 755 source/bin/libsmbsharemodes.a $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.a +install -m 755 source/bin/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libarchdir}/libsmbsharemodes.so +install -m 755 source/bin/libsmbsharemodes.a $RPM_BUILD_ROOT%{_libarchdir}/libsmbsharemodes.a install -m 644 source/include/smb_share_modes.h $RPM_BUILD_ROOT%{_includedir} -rm -f $RPM_BUILD_ROOT%{_libdir}/samba/libsmbsharemodes.* -ln -s /%{_libdir}/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.so.0 +rm -f $RPM_BUILD_ROOT%{_libarchdir}/samba/libsmbsharemodes.* +ln -s /%{_libdir}/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libarchdir}/libsmbsharemodes.so.0 # Install pam_smbpass.so -install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so +install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_libarch}/security/pam_smbpass.so ## cleanup /bin/rm -rf $RPM_BUILD_ROOT/usr/lib*/samba/security @@ -353,10 +362,10 @@ fi %{_bindir}/pdbedit %{_bindir}/eventlogadm -%{_libdir}/samba/idmap/*.so -%{_libdir}/samba/nss_info/*.so -%{_libdir}/samba/vfs/*.so -%{_libdir}/samba/auth/*.so +%{_libarchdir}/samba/idmap/*.so +%{_libarchdir}/samba/nss_info/*.so +%{_libarchdir}/samba/vfs/*.so +%{_libarchdir}/samba/auth/*.so %{_mandir}/man1/smbcontrol.1* %{_mandir}/man1/smbstatus.1* @@ -448,19 +457,19 @@ fi %config(noreplace) %{_sysconfdir}/samba/smb.conf %config(noreplace) %{_sysconfdir}/samba/lmhosts -%attr(755,root,root) /%{_lib}/libnss_wins.so* -%attr(755,root,root) /%{_lib}/libnss_winbind.so* -%attr(755,root,root) /%{_lib}/security/pam_winbind.so -%attr(755,root,root) /%{_lib}/security/pam_smbpass.so +%attr(755,root,root) /%{_libarch}/libnss_wins.so* +%attr(755,root,root) /%{_libarch}/libnss_winbind.so* +%attr(755,root,root) /%{_libarch}/security/pam_winbind.so +%attr(755,root,root) /%{_libarch}/security/pam_smbpass.so %{_includedir}/libsmbclient.h -%{_libdir}/libsmbclient.* +%{_libarchdir}/libsmbclient.* %{_includedir}/smb_share_modes.h -%{_libdir}/libsmbsharemodes.* +%{_libarchdir}/libsmbsharemodes.* -%{_libdir}/samba/*.dat -%{_libdir}/samba/*.msg -%{_libdir}/samba/charset/*.so +%{_libarchdir}/samba/*.dat +%{_libarchdir}/samba/*.msg +%{_libarchdir}/samba/charset/*.so %{_bindir}/testparm %{_bindir}/smbpasswd |