File libicns.spec of Package libicns

# spec file for package libicns
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Malcolm J Lewis <>
# 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

%define         libname %{name}1
Name:           libicns
Version:        0.8.1
Release:        0
Summary:        Application for manipulation of the Mac OS icns
License:        LGPL-2.1+
Group:          Productivity/Graphics/Convertors
BuildRequires:  libjasper-devel
BuildRequires:  libpng12-compat-devel
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

It can read and write files from the Mac OS X icns format, as well as
read from Mac OS resource files and macbinary encoded Mac OS resource
forks. As of release 0.5.9, it can fully read and write any 128x128 and
all smaller 32-bit icons, and read support for 8-bit, 4-bit, and 1-bit
icons. If linked against Jasper, it also has full support for 256x256
and 512x512 32-bit icons with masks as alpha channels.

The package contains icns2png, png2icns and icontainer2icns.

%package -n icns-utils
Summary:        Application for manipulation of the Mac OS icns
License:        GPL-2.0
Group:          Productivity/Graphics/Convertors

%description -n icns-utils
Utilities to convert to and from icns files using %{name}:
    1. png2icns: Tool to convert png icons to icns icons,
    2. icns2png: Tool to convert icns icons to png, and
    3. icontainer2icns: Tool for extracting icns files from icontainers.

%package -n %{libname}
Summary:        System libraries for %{name}
License:        LGPL-2.1
Group:          System/Libraries

%description -n %{libname}
System libraries file for %{name}.

%package devel
Summary:        Development files for %{name}
License:        LGPL-2.1
Group:          Development/Libraries/Other
Requires:       %{libname} = %{version}-%{release}
Provides:       %{libname}-devel = %{version}-%{release}

%description devel
Libraries and header files for developing applications that use libicns.

%setup -q

%configure \
make %{?_smp_mflags}

make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files -n icns-utils

%files -n %{libname}

%files devel
%doc src/apidocs.* DEVNOTES