File iat.spec of Package iat

#
# spec file for package iat
#
# Copyright (c) 2014 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/
#

%define git_date 20100812
%define git_commit 2f149fb
%define major   0

Name:           iat
Version:        0.1.7+git%{git_date}
Release:        0
License:        GPL-2.0+
Summary:        ISO 9660 Analyzer Tool
Url:            http://iat.berlios.de
Group:          Productivity/Other
Source0:        %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM iat-0.1.7-manpage.patch lazy.kent@opensuse.org -- newline characters is not allowed in an escape name
Patch0:         iat-0.1.7-manpage.patch
# PATCH-FIX-UPSTREAM iat-0.1.7-automake112.patch lazy.kent@opensuse.org -- fix build with automake-1.12
Patch1:         iat-0.1.7-automake112.patch
# PATCH-FIX-UPSTREAM iat-0.1.7-automake114.patch lazy.kent@opensuse.org -- fix build with automake-1.14
Patch2:         iat-0.1.7-automake114.patch
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
ISO 9660 Analyzer Tool is a tool for detecting the structure of many
types of CD/DVD image. With ISO 9660 Analyzer Tool you can:

- Create Cuesheet file from image CD/DVD.
- Create TOC file from image CD/DVD.
- Convert image CD/DVD to ISO 9660.
- Debug image.

%package -n libiat%{major}
Summary:        IAT Shared Library
Group:          System/Libraries

%description -n libiat%{major}
Shared library for the ISO 9660 Analyzer Tool.

%package -n libiat-devel
Summary:        IAT Development Files
Group:          Development/Libraries/C and C++
Requires:       libiat%{major} = %{version}

%description -n libiat-devel
Development files for the ISO 9660 Analyzer Tool.

%prep
%setup -qn %{name}-%{git_commit}
%patch0
%if 0%{?suse_version} >= 1220
%patch1
%endif
%patch2 -p1

%build
./autogen.sh
%configure --disable-static
make %{?_smp_flags}

%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la

%post -n libiat%{major} -p /sbin/ldconfig

%postun -n libiat%{major} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/%{name}
%doc %{_mandir}/man1/*

%files -n libiat%{major}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files -n libiat-devel
%defattr(-,root,root,-)
%{_includedir}/libiat
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by