[packages/pam-pam_mobile_otp] up to 0.6.2; lib64 fix, use cc and our *flags

glen glen at pld-linux.org
Mon Feb 3 21:24:13 CET 2014


commit 2e464a58939192d9740c6d7e641a9e7cef3c3564
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Feb 3 22:23:56 2014 +0200

    up to 0.6.2; lib64 fix, use cc and our *flags

 pam-pam_mobile_otp.spec      | 23 +++++++++++++----------
 pam_mobile_otp-DESTDIR.patch |  3 +--
 2 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/pam-pam_mobile_otp.spec b/pam-pam_mobile_otp.spec
index 3cd91f3..6369cd7 100644
--- a/pam-pam_mobile_otp.spec
+++ b/pam-pam_mobile_otp.spec
@@ -2,15 +2,16 @@
 Summary:	Mobile-OTP PAM module
 Summary(pl.UTF-8):	Moduł PAM Mobile-OTP
 Name:		pam-%{modulename}
-Version:	0.6.1
+Version:	0.6.2
 Release:	0.1
 License:	GPL
 Group:		Applications
 Source0:	http://motp.sourceforge.net/%{modulename}-%{version}.tgz
-# Source0-md5:	28a2239d5b7afdec8437c4cbca4b7417
+# Source0-md5:	972e6fdd2f785b6f779dd9823118f5f2
 Patch0:		%{modulename}-DESTDIR.patch
 URL:		http://motp.sourceforge.net/
 BuildRequires:	pam-devel
+BuildRequires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -18,21 +19,24 @@ Mobile One Time Passwords - strong, two-factor authentication with
 mobile phones.
 
 %prep
-%setup -q -n %{modulename}
+%setup -qc
+mv %{modulename}/* .
 %patch0 -p1
 
+%{__sed} -i -e 's,gcc,$(CC),' Makefile
+
 %build
-%{__make}
+%{__make} \
+	CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT{/lib/security/,/etc/security,/var/cache/motp}
-
+install -d $RPM_BUILD_ROOT{/%{_lib}/security,/etc/security,/var/cache/motp}
 %{__make} install \
+	LIB=%{_lib} \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install motp.conf $RPM_BUILD_ROOT/etc/security
+cp -p motp.conf $RPM_BUILD_ROOT/etc/security
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -40,7 +44,6 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG README MOTP.html
-
-%attr(755,root,root) /lib/security/pam_mobile_otp.so
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/motp.conf
+%attr(755,root,root) /%{_lib}/security/pam_mobile_otp.so
 %attr(750,root,root) %dir /var/cache/motp
diff --git a/pam_mobile_otp-DESTDIR.patch b/pam_mobile_otp-DESTDIR.patch
index 8f2e968..9953fce 100644
--- a/pam_mobile_otp-DESTDIR.patch
+++ b/pam_mobile_otp-DESTDIR.patch
@@ -1,4 +1,3 @@
-diff -urN pam_mobile_otp.orig/Makefile pam_mobile_otp/Makefile
 --- pam_mobile_otp.orig/Makefile	2007-02-10 17:24:42.000000000 +0100
 +++ pam_mobile_otp/Makefile	2008-03-11 13:49:43.000000000 +0100
 @@ -12,7 +12,7 @@
@@ -6,7 +5,7 @@ diff -urN pam_mobile_otp.orig/Makefile pam_mobile_otp/Makefile
  
  install	: pam_mobile_otp.so
 -	cp pam_mobile_otp.so /lib/security/pam_mobile_otp.so
-+	cp pam_mobile_otp.so $(DESTDIR)/lib/security/pam_mobile_otp.so
++	cp pam_mobile_otp.so $(DESTDIR)/$(LIB)/security/pam_mobile_otp.so
  
  clean	: 
  	rm *.o *.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pam-pam_mobile_otp.git/commitdiff/2e464a58939192d9740c6d7e641a9e7cef3c3564



More information about the pld-cvs-commit mailing list