8af3b9
%global nmu +nmu1
8af3b9
8af3b9
Name:		libpaper
8af3b9
Version:	1.1.24
38742e
Release:	9%{?dist}
8af3b9
Summary:	Library and tools for handling papersize
8af3b9
Group:		System Environment/Libraries
8af3b9
License:	GPLv2
8af3b9
URL:		http://packages.qa.debian.org/libp/libpaper.html
8af3b9
Source0:	http://ftp.debian.org/debian/pool/main/libp/libpaper/%{name}_%{version}%{nmu}.tar.gz
8af3b9
# Filed	upstream as:
8af3b9
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496126
8af3b9
Patch0:		libpaper-1.1.20-automake_1.10.patch
8af3b9
# Upstream bug:
8af3b9
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475683
8af3b9
Patch1:		libpaper-1.1.23-debianbug475683.patch
8af3b9
# Filed upstream as:
8af3b9
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481213
8af3b9
Patch2:		libpaper-useglibcfallback.patch
38742e
# 1753534 - Too many open files in ImageMagick
38742e
Patch3:         libpaper-file-leak.patch
38742e
8af3b9
BuildRequires:	libtool, gettext, gawk
8af3b9
8af3b9
%description
8af3b9
The paper library and accompanying files are intended to provide a 
8af3b9
simple way for applications to take actions based on a system- or 
8af3b9
user-specified paper size. This release is quite minimal, its purpose 
8af3b9
being to provide really basic functions (obtaining the system paper name 
8af3b9
and getting the height and width of a given kind of paper) that 
8af3b9
applications can immediately integrate.
8af3b9
8af3b9
%package devel
8af3b9
Summary:	Headers/Libraries for developing programs that use libpaper
8af3b9
Group:		Development/Libraries
8af3b9
Requires:	%{name} = %{version}-%{release}
8af3b9
8af3b9
%description devel
8af3b9
This package contains headers and libraries that programmers will need 
8af3b9
to develop applications which use libpaper.
8af3b9
8af3b9
%prep
8af3b9
%setup -q -n %{name}-%{version}%{nmu}
8af3b9
%patch0 -p1 -b .automake110
8af3b9
%patch1 -p1 -b .dlfix
8af3b9
%patch2 -p1 -b .useglibcfallback
38742e
%patch3 -p1 -b .file-leak
8af3b9
libtoolize
8af3b9
8af3b9
%build
8af3b9
touch AUTHORS NEWS
8af3b9
aclocal
8af3b9
autoconf
8af3b9
automake -a
8af3b9
%configure --disable-static
8af3b9
# Disable rpath
8af3b9
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
8af3b9
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
8af3b9
make %{?_smp_mflags}
8af3b9
8af3b9
%install
8af3b9
make DESTDIR=$RPM_BUILD_ROOT install
8af3b9
rm $RPM_BUILD_ROOT%{_libdir}/*.la
8af3b9
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
8af3b9
echo '# Simply write the paper name. See papersize(5) for possible values' > $RPM_BUILD_ROOT%{_sysconfdir}/papersize
8af3b9
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/libpaper.d
8af3b9
for i in cs da de es fr gl hu it ja nl pt_BR sv tr uk vi; do
8af3b9
	mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/;
8af3b9
	msgfmt debian/po/$i.po -o $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/%{name}.mo;
8af3b9
done
8af3b9
%find_lang %{name}
8af3b9
8af3b9
%post -p /sbin/ldconfig
8af3b9
8af3b9
%postun -p /sbin/ldconfig
8af3b9
8af3b9
%files -f %{name}.lang
8af3b9
%doc COPYING ChangeLog README
8af3b9
%config(noreplace) %{_sysconfdir}/papersize
8af3b9
%dir %{_sysconfdir}/libpaper.d
8af3b9
%{_bindir}/paperconf
8af3b9
%{_libdir}/libpaper.so.*
8af3b9
%{_sbindir}/paperconfig
8af3b9
%{_mandir}/man1/*
8af3b9
%{_mandir}/man5/*
8af3b9
%{_mandir}/man8/*
8af3b9
8af3b9
%files devel
8af3b9
%{_includedir}/paper.h
8af3b9
%{_libdir}/libpaper.so
8af3b9
%{_mandir}/man3/*
8af3b9
8af3b9
%changelog
38742e
* Wed Jan 29 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.1.24-9
38742e
- 1753534 - Too many open files in ImageMagick
38742e
8af3b9
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.1.24-8
8af3b9
- Mass rebuild 2014-01-24
8af3b9
8af3b9
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1.24-7
8af3b9
- Mass rebuild 2013-12-27
8af3b9
8af3b9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.24-6
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8af3b9
8af3b9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.24-5
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8af3b9
8af3b9
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.24-4
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8af3b9
8af3b9
* Tue May 17 2011 Tom Callaway <spot@fedoraproject.org> - 1.1.24-3
8af3b9
- bump to nmu1
8af3b9
8af3b9
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.24-2
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8af3b9
8af3b9
* Sat Apr 24 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.24-1
8af3b9
- update to 1.1.24
8af3b9
8af3b9
* Thu Mar  4 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.23-7
8af3b9
- update to 1.1.23+nmu2
8af3b9
8af3b9
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.23-6
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8af3b9
8af3b9
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.23-5
8af3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8af3b9
8af3b9
* Mon Feb 16 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.23-4
8af3b9
- run libtoolize to fix build with newer libtool
8af3b9
- disable rpath
8af3b9
8af3b9
* Fri Aug 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.23-3
8af3b9
- update to nmu1
8af3b9
- apply patch to fix imprecise definition of DL format
8af3b9
- apply patch so that when no config is present, libpaper will fallback through
8af3b9
  LC_PAPER before giving up and using Letter
8af3b9
8af3b9
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.23-2
8af3b9
- Autorebuild for GCC 4.3
8af3b9
8af3b9
* Tue Feb 19 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.23-1
8af3b9
- 1.1.23
8af3b9
8af3b9
* Fri Aug 24 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.22-1.1
8af3b9
- missing BR: gawk
8af3b9
8af3b9
* Thu Aug 23 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.22-1
8af3b9
- bump, no real changes of note, rebuild for ppc32
8af3b9
- license fix, v2 only
8af3b9
8af3b9
* Mon Jul 09 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.21-1.1
8af3b9
- BR: libtool
8af3b9
8af3b9
* Mon Jul 09 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.21-1
8af3b9
- bump to 1.1.21
8af3b9
- fix automake bug (bz 247458)
8af3b9
8af3b9
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 1.1.20-5
8af3b9
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
8af3b9
8af3b9
* Sat Sep 23 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.20-4
8af3b9
- remove aclocal call
8af3b9
8af3b9
* Sat Sep 23 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.20-3
8af3b9
- fix FC-4 with aclocal call
8af3b9
- move man3 pages to -devel
8af3b9
- don't set default, just put comment in conf file
8af3b9
- own /etc/libpaper.d
8af3b9
- use debian/NEWS
8af3b9
- include the meager translations
8af3b9
- use --disable-static
8af3b9
8af3b9
* Sat Sep 23 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.20-2
8af3b9
- nuke static lib
8af3b9
- own /etc/papersize
8af3b9
- fix mixed spaces/tabs rpmlint warning
8af3b9
8af3b9
* Sat Sep 23 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.20-1
8af3b9
- initial package for Fedora Extras