diff options
author | Michael Adam <obnox@samba.org> | 2008-08-29 16:55:55 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-09-11 12:54:22 +0200 |
commit | cf13475d4d5cfe968d694d49b8fd0f6020c5a9d8 (patch) | |
tree | eb7f68cb7e3ae3ff2f8a5906a2ed3b123a0c6fdf /packaging | |
parent | c22bf57329f16a45eb0954b72f8083270f6535e7 (diff) | |
download | samba-cf13475d4d5cfe968d694d49b8fd0f6020c5a9d8.tar.gz samba-cf13475d4d5cfe968d694d49b8fd0f6020c5a9d8.tar.xz samba-cf13475d4d5cfe968d694d49b8fd0f6020c5a9d8.zip |
packaging(RHEL): fix libdir installation by using _libarch/_libarchdir
Michael
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/RHEL/samba.spec.tmpl | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl index 8c34a4a9ee2..0cbb1d57865 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,7 +136,7 @@ CC="$CC" CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ --prefix=%{_prefix} \ --localstatedir=/var \ --with-configdir=%{_sysconfdir}/samba \ - --with-libdir=%{_libdir}/samba \ + --with-libdir=%{_libarchdir}/samba \ --with-lockdir=/var/lib/samba \ --with-logfilebase=/var/log/samba \ --with-mandir=%{_mandir} \ @@ -187,9 +196,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 @@ -208,30 +217,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 @@ -354,10 +363,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* @@ -447,19 +456,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 %{_includedir}/netapi.h %{_includedir}/wbclient.h |