File icns-utils.spec of Package icns-utils
#
# spec file for package icns-utils
#
# Copyright (c) 2015 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 soname 1
Name: icns-utils
Version: 0.8.1+svn347
Release: 0
Summary: Tools for converting Mac icons to PNG images
License: LGPL-2.1
Group: Productivity/Graphics/Convertors
Url: http://sourceforge.net/projects/icns/
# from https://git.code.sf.net/p/icns/code
Source0: libicns-%{version}.tar.xz
Patch0: libicns-libpng.patch
Patch1: libicns-autoconf.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: intltool
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1220
BuildRequires: openjpeg-devel
%else
BuildRequires: libjasper-devel
%endif
%if 0%{?suse_version} < 1220
BuildRequires: xz
%endif
%description
Software package for reading and writing the MacOS X icon format
(.icns files).
It consists of a C library and command-line utilites.
%package -n libicns%{soname}
Summary: Library for converting Mac icons to PNG images
Group: System/Libraries
%description -n libicns%{soname}
Library for reading and writing the MacOS X icon format (.icns files).
%package -n libicns-devel
Summary: Development files for libicns, a Mac icon converter
Group: Development/Libraries/C and C++
Requires: libicns%{soname} = %{version}-%{release}
%description -n libicns-devel
Library for reading and writing the MacOS X icon format (.icns files).
%package -n libicns-doc
Summary: Documentation for libicns, a Mac icon converter
Group: Productivity/Graphics/Convertors
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description -n libicns-doc
Software package for reading and writing the MacOS X icon format
(.icns files).
This subpackage contains its documentation.
%prep
%setup -q -n libicns-%{version}
%patch0
%patch1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
autoreconf -f -i
%configure \
--disable-static
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -rf %{buildroot}%{_libdir}/libicns.la
for i in AUTHORS ChangeLog COPYING* DEVNOTES NEWS README; do
install -D -m644 "$i" %{buildroot}%{_docdir}/libicns/"$i";
done
install -D -m644 src/apidocs.html %{buildroot}%{_docdir}/libicns/apidocs.html
install -D -m644 src/apidocs.txt %{buildroot}%{_docdir}/libicns/apidocs.txt
%post -n libicns%{soname} -p /sbin/ldconfig
%postun -n libicns%{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/icns2png
%{_bindir}/icontainer2icns
%{_bindir}/icnsutil
%{_bindir}/png2icns
%{_mandir}/man1/icns2png.1.gz
%{_mandir}/man1/icontainer2icns.1.gz
%{_mandir}/man1/icnsutil.1.gz
%{_mandir}/man1/png2icns.1.gz
%files -n libicns%{soname}
%defattr(-,root,root)
%{_libdir}/libicns.so.*
%files -n libicns-devel
%defattr(-,root,root)
%{_includedir}/icns.h
%{_libdir}/libicns.so
%{_libdir}/pkgconfig/libicns.pc
%files -n libicns-doc
%defattr(-,root,root)
%{_docdir}/libicns/
%changelog