File unshield.spec of Package unshield
#
# spec file for package unshield
#
# Copyright (c) 2016 SUSE LINUX 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/
#
%define major 1_3
%define libname lib%{name}
Name: unshield
Version: 1.3
Release: 0
Summary: A Program to Extract InstallShield Cabinet Files
License: MIT
Group: Productivity/Archiving/Compression
Url: https://github.com/twogood/unshield
Source0: https://github.com/twogood/unshield/archive/%{version}.tar.gz
Patch0: libconvert_utf_static.patch
# PATCH-FIX-UPSTREAM armv7l-fpic.patch matwey.kornilov@gmail.com -- fix armv7l build
Patch1: armv7l-fpic.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Cabinet (.CAB) files are a form of archive, which is used by the
InstallShield installer software. The unshield program simply unpacks
such files. This is the binary executable.
See http://synce.sourceforge.net/ for more information.
%package -n %{libname}%{major}
Summary: A Program to Extract InstallShield Cabinet Files
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n %{libname}%{major}
Cabinet (.CAB) files are a form of archive, which is used by the
InstallShield installer software. The unshield program simply unpacks
such files. This is the shared library.
See http://synce.sourceforge.net/ for more information.
%package -n %{libname}-devel
Summary: Header files, libraries and development documentation for %{libname}
Group: Development/Libraries/C and C++
Requires: %{libname}%{major} = %{version}
%description -n %{libname}-devel
This package contains the header files, static libraries and development
documentation for %{libname}. If you like to develop programs using %{libname},
you will need to install %{libname}-devel.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%cmake
# necessary for out of tree build
ln -s \
%{_builddir}/%{name}-%{version}/build/lib/unshield_config.h \
%{_builddir}/%{name}-%{version}/lib/unshield_config.h
make %{?_smp_mflags}
%install
# necessary for out of tree build
cp \
%{_builddir}/%{name}-%{version}/build/libunshield.pc \
%{_builddir}/%{name}-%{version}/libunshield.pc
%cmake_install
%post -n %{libname}%{major} -p /sbin/ldconfig
%postun -n %{libname}%{major} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README.md LICENSE
%{_bindir}/%{name}
%{_mandir}/*/%{name}.*.gz
%files -n %{libname}%{major}
%defattr(-,root,root)
%{_libdir}/%{libname}.so.*
%files -n %{libname}-devel
%defattr(-,root,root)
%{_includedir}/%{libname}.h
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{libname}.pc
%changelog