File libtranscript.spec of Package libtranscript

#
# spec file for package libtranslate
#
# Copyright (c) 2010 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
%define debug_package %{nil}

Name:           libtranscript
Version:        0.3.3
Release:        1
Summary:        Character set conversion library
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

License:        GPLv3
URL:            http://os.ghalkes.nl/libtranscript.html
Source0:        http://os.ghalkes.nl/dist/libtranscript-0.3.3.tar.bz2

BuildRequires:  gcc-c++, libtool, gettext
%if 0%{?suse_version}
BuildRequires:  pkg-config
%endif
%if 0%{?mdkversion}%{?fedora}%{?rhel_version}%{?centos_version}%{?rhel}
BuildRequires:  pkgconfig
%endif


%description
libtranscript is a character set conversion library which allows great control
over the conversion.

%package -n %{name}1
Summary:        Character set conversion library
Group:          Development/Libraries/C and C++

%description -n %{name}1
libtranscript is a character set conversion library which allows great control
over the conversion.


%package        devel
Group:          Development/Libraries/C and C++
Summary:        Development files for %{name}
Requires:       %{name}1 = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name} and converter modules for %{name}.


%prep
%setup -q


%build
./configure --prefix=%{_prefix} --libdir=%{_libdir} --with-ucm2ltc --docdir=%{_docdir}/%{name}1 --dump-log
make %{?_smp_mflags}


%install
make install install-moddev DESTDIR=%{buildroot}
find %{buildroot} '(' -name '*.la' -o -name '*.a' ')' -exec rm -f {} ';'
install -d %{buildroot}/%{_docdir}/%{name}-dev
cp %{buildroot}/%{_docdir}/%{name}1/COPYING %{buildroot}/%{_docdir}/%{name}-dev/
%if 0%{?fedora}%{?rhel_version}%{?centos_version}%{?rhel}
find %{buildroot}/%{_libdir} -type f -name '*.so.*' | xargs chmod +x
%endif

%clean
rm -rf %{buildroot}


%post -n %{name}1 -p /sbin/ldconfig

%postun -n %{name}1 -p /sbin/ldconfig


%files -n %{name}1
%defattr(-, root, root, -)
%{_libdir}/*.so.*
%{_libdir}/transcript1
%docdir %{_docdir}/%{name}1
%{_docdir}/%{name}1

%files devel
%defattr(-, root, root, -)
%{_bindir}/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%docdir %{_docdir}/%{name}-dev
%{_docdir}/%{name}-dev
%{_mandir}/man1/*