SPECS: unrar.spec - build and package libunrar

wiget wiget at pld-linux.org
Tue May 8 13:59:54 CEST 2007


Author: wiget                        Date: Tue May  8 11:59:54 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build and package libunrar

---- Files affected:
SPECS:
   unrar.spec (1.67 -> 1.68) 

---- Diffs:

================================================================
Index: SPECS/unrar.spec
diff -u SPECS/unrar.spec:1.67 SPECS/unrar.spec:1.68
--- SPECS/unrar.spec:1.67	Tue May  8 11:53:27 2007
+++ SPECS/unrar.spec	Tue May  8 13:59:49 2007
@@ -6,7 +6,7 @@
 Summary(uk.UTF-8):	Розпаковувач файлів .zip
 Name:		unrar
 Version:	3.7.5
-Release:	1
+Release:	1.1
 License:	Freeware
 Group:		Applications/Archiving
 #Source0Download: http://www.rarlab.com/rar_add.htm
@@ -19,6 +19,9 @@
 BuildRequires:	rpmbuild(macros) >= 1.167
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# -fPIC for other archs too ?
+%define	specflags_x86_64 -fPIC
+
 %description
 The unRAR utility is a freeware program, distributed with source code
 and developed for extracting, testing and viewing the contents of
@@ -48,20 +51,47 @@
 PKZIP та PKUNZIP від PKWARE для MS-DOS, але в багатьох випадках опції
 або умовчання відрізняються.
 
+%package -n libunrar
+Summary:	Library for extracting RAR archive
+Group:		Libraries
+
+%description -n libunrar
+Library for extracting RAR archive.
+
+%package -n libunrar-devel
+Summary:	Development files for libunrar
+Group:		Development/Libraries
+Requires:	libunrar = %{version}-%{release}
+
+%description -n libunrar-devel
+Development files for libunrar.
+
 %prep
 %setup -q -n unrar
 
 %build
+install -d done
+%{__make} -f makefile.unix clean
 %{__make} -f makefile.unix \
 	CC="%{__cc}" \
 	CXX="%{__cxx}" \
-	CXXFLAGS="%{rpmcxxflags}"
+	CXXFLAGS="%{rpmcxxflags}" \
+	STRIP=":"
+%{__make} -f makefile.unix clean
+%{__make} -f makefile.unix lib \
+	CC="%{__cc}" \
+	CXX="%{__cxx}" \
+	CXXFLAGS="%{rpmcxxflags}" \
+	LDFLAGS="%{rpmldflags} -Wl,-soname -Wl,libunrar.so.%{version}" \
+	STRIP=":"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/{man1,pl/man1}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/{man1,pl/man1}}
 
 install unrar $RPM_BUILD_ROOT%{_bindir}
+install libunrar.so $RPM_BUILD_ROOT%{_libdir}/libunrar.so.%{version}
+ln -s linunrar.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libunrar.so
 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1
 install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/unrar.1
 
@@ -75,12 +105,23 @@
 %lang(pl) %{_mandir}/pl/man1/*
 %attr(755,root,root) %{_bindir}/*
 
+%files -n libunrar
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libunrar.so.*.*
+
+%files -n libunrar-devel
+%defattr(644,root,root,755)
+%{_libdir}/libunrar.so
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.68  2007/05/08 11:59:49  wiget
+- build and package libunrar
+
 Revision 1.67  2007/05/08 09:53:27  wiget
 - updated to 3.7.5
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/unrar.spec?r1=1.67&r2=1.68&f=u



More information about the pld-cvs-commit mailing list