File unrar.spec of Package unrar

#
# spec file for package unrar (Version 3.90.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           unrar
BuildRequires:  gcc-c++
Version:        3.90.4
Release:        1
AutoReqProv:    on
Group:          Productivity/Archiving/Compression
License:        Unrar License. Freely distributable
Url:            http://www.rarlab.com
Summary:        A program to extract, test, and view RAR archives
Source:         %{name}src-3.9.4.tar.bz2
Patch1:         %{name}src-3.9-types.patch
Patch2:         %{name}src-3.9-gcc.patch
Patch3:         %{name}src-3.9-variablesize.patch
Patch4:         %{name}src-3.9-soname.patch
Patch5:         %{name}src-man.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The unRAR utility is a freeware program distributed with source code
and developed for extracting, testing, and viewing the contents of
archives created with the RAR archiver.

Authors:
--------
    Eugene Roshal <roshal@creabel.com>

%package -n libunrar3_9_4
License:        Unrar License. Freely distributable
Summary:        Decompress library for RAR v3 archives
Group:          System Environment/Libraries

%description -n libunrar3_9_4
The libunrar library allows programs linking against it to decompress
existing RAR v3 archives.


%package -n libunrar-devel
License:        Unrar License. Freely distributable
Summary:        Development files for libunrar
Group:          Development/Libraries
Requires:       libunrar3_9_4 = %{version}-%{release}
Provides:       libunrar3_9_4-devel

%description -n libunrar-devel
The libunrar-devel package contains libraries and header files for
developing applications that use libunrar.

%prep
%setup -q -n %{name}
%patch1
%patch2
%patch3
%patch4
%patch5

%build
make -f makefile.unix CXXFLAGS="$RPM_OPT_FLAGS -Wall -fPIC \
    -fmessage-length=0 -fno-strict-aliasing -fstack-protector" STRIP=true
make -f makefile.unix lib CXXFLAGS="$RPM_OPT_FLAGS -Wall -fPIC \
    -fmessage-length=0 -fno-strict-aliasing -fstack-protector" STRIP=true

%install
install -Dm 755 unrar $RPM_BUILD_ROOT%{_bindir}/unrar
install -Dm 644 unrar.1 %{buildroot}%{_mandir}/man1/unrar.1
install -Dm 755 libunrar.so.3.9.4 %{buildroot}%{_libdir}/libunrar.so.3.9.4
install -Dm 644 dll.hpp %{buildroot}/%{_includedir}/unrar/dll.hpp
ln -s libunrar.so.3.9.4 %{buildroot}%{_libdir}/libunrar.so.3
ln -s libunrar.so.3 %{buildroot}%{_libdir}/libunrar.so

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libunrar3_9_4 -p /sbin/ldconfig

%postun -n libunrar3_9_4 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc license.txt readme.txt
%{_bindir}/unrar
%{_mandir}/man1/unrar.1*

%files -n libunrar3_9_4
%defattr(-,root,root)
%doc license.txt readme.txt
%{_libdir}/*.so.*

%files -n libunrar-devel
%defattr(-,root,root)
%doc license.txt readme.txt
%{_includedir}/*
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by