|
|
|
@ -1,22 +1,18 @@
|
|
|
|
|
#%%global nmu +nmu4
|
|
|
|
|
|
|
|
|
|
Name: libpaper
|
|
|
|
|
Version: 1.1.28
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Version: 2.1.1
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
# Needed to replace separate paper package
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Summary: Library and tools for handling papersize
|
|
|
|
|
License: GPLv2
|
|
|
|
|
URL: http://packages.qa.debian.org/libp/libpaper.html
|
|
|
|
|
Source0: http://ftp.debian.org/debian/pool/main/libp/libpaper/%{name}_%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Filed upstream as:
|
|
|
|
|
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481213
|
|
|
|
|
Patch2: libpaper-useglibcfallback.patch
|
|
|
|
|
# Memory leak
|
|
|
|
|
Patch3: libpaper-file-leak.patch
|
|
|
|
|
# memory leak found by covscan, reported to debian upstream
|
|
|
|
|
#Patch4: libpaper-covscan.patch
|
|
|
|
|
|
|
|
|
|
# libpaper is LGPL-2.1+
|
|
|
|
|
# bundled libgnu is LGPL-2.1+, LGPL-2+ and GPL-3+
|
|
|
|
|
# paperspecs is Public Domain
|
|
|
|
|
# localepaper.c is FSFAP
|
|
|
|
|
License: LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND GPL-3.0-or-later AND LGPL-2.0-or-later AND FSFAP
|
|
|
|
|
URL: https://github.com/rrthomas/libpaper/
|
|
|
|
|
Source0: https://github.com/rrthomas/libpaper/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
# Pulled from paper
|
|
|
|
|
Source1: localepaper.c
|
|
|
|
|
|
|
|
|
|
# gcc is no longer in buildroot by default
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
@ -24,79 +20,153 @@ BuildRequires: gcc
|
|
|
|
|
BuildRequires: git-core
|
|
|
|
|
# uses make
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: libtool, gettext, gawk
|
|
|
|
|
BuildRequires: libtool, gettext, gawk, autoconf, automake
|
|
|
|
|
BuildRequires: help2man, tar, gnupg2, perl-interpreter
|
|
|
|
|
|
|
|
|
|
Provides: bundled(gnulib)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The paper library and accompanying files are intended to provide a
|
|
|
|
|
simple way for applications to take actions based on a system- or
|
|
|
|
|
user-specified paper size. This release is quite minimal, its purpose
|
|
|
|
|
being to provide really basic functions (obtaining the system paper name
|
|
|
|
|
and getting the height and width of a given kind of paper) that
|
|
|
|
|
applications can immediately integrate.
|
|
|
|
|
The libpaper package enables users to indicate their preferred paper
|
|
|
|
|
size and specifies system-wide and per-user paper size catalogues, which can
|
|
|
|
|
also be used directly (see paperspecs(5)).
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Headers/Libraries for developing programs that use libpaper
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains headers and libraries that programmers will need
|
|
|
|
|
This package contains headers and libraries that programmers will need
|
|
|
|
|
to develop applications which use libpaper.
|
|
|
|
|
|
|
|
|
|
%package -n paper
|
|
|
|
|
Summary: Print paper size information
|
|
|
|
|
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
# This is licensed differently from libpaper.
|
|
|
|
|
# paper.c is GPL-3.0-or-later
|
|
|
|
|
# paperconf.c is GPL 2.0 only
|
|
|
|
|
# localepaper.c is FSFAP (except it is missing the warranty disclaimer... but the intent is clear)
|
|
|
|
|
License: GPL-3.0-or-later AND FSFAP AND GPL-2.0-only
|
|
|
|
|
|
|
|
|
|
%description -n paper
|
|
|
|
|
The paper(1) utility can be used to find the user's preferred
|
|
|
|
|
default paper size and give information about known sizes.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -S git
|
|
|
|
|
libtoolize
|
|
|
|
|
cp %{SOURCE1} src/
|
|
|
|
|
|
|
|
|
|
%if 0
|
|
|
|
|
sed -i 's|gnulib_tool=$gnulib_path/gnulib-tool|gnulib_tool=%{_bindir}/gnulib-tool|g' bootstrap
|
|
|
|
|
sed -i 's|./gnulib/gnulib-tool|%{_bindir}/gnulib-tool|g' bootstrap.conf
|
|
|
|
|
sed -i '/doc\/INSTALL/d' bootstrap
|
|
|
|
|
./bootstrap --gnulib-srcdir=%{_datadir}/gnulib/ --skip-git
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
touch AUTHORS NEWS
|
|
|
|
|
aclocal
|
|
|
|
|
autoheader
|
|
|
|
|
autoconf
|
|
|
|
|
automake -a
|
|
|
|
|
%configure --disable-static
|
|
|
|
|
# Disable rpath
|
|
|
|
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
|
|
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
# localepaper
|
|
|
|
|
pushd src
|
|
|
|
|
%{__cc} %{optflags} -I.. -Ilibgnu -o localepaper localepaper.c libgnu/.libs/libgnupaper.a %{_hardening_ldflags}
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# No upstream tests
|
|
|
|
|
echo "Testing localepaper tool"
|
|
|
|
|
locale width height > expected
|
|
|
|
|
./src/localepaper | tr ' ' "\n" > got
|
|
|
|
|
diff -u expected got
|
|
|
|
|
# No real way to test the paper tool
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
|
|
|
|
echo '# Simply write the paper name. See papersize(5) for possible values' > $RPM_BUILD_ROOT%{_sysconfdir}/papersize
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/libpaper.d
|
|
|
|
|
# maybe someday the translations will return
|
|
|
|
|
%if 0
|
|
|
|
|
for i in cs da de es fr gl hu it ja nl pt_BR sv tr uk vi; do
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/;
|
|
|
|
|
msgfmt debian/po/$i.po -o $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/%{name}.mo;
|
|
|
|
|
done
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
mkdir %{buildroot}%{_libexecdir}
|
|
|
|
|
install -m0755 src/localepaper %{buildroot}%{_libexecdir}
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
|
%files
|
|
|
|
|
%doc ChangeLog README
|
|
|
|
|
%license COPYING
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/papersize
|
|
|
|
|
%dir %{_sysconfdir}/libpaper.d
|
|
|
|
|
%{_bindir}/paperconf
|
|
|
|
|
%{_libdir}/libpaper.so.1.1.2
|
|
|
|
|
%{_libdir}/libpaper.so.1
|
|
|
|
|
%{_sbindir}/paperconfig
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
|
%{_mandir}/man8/*
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/paperspecs
|
|
|
|
|
%{_libdir}/libpaper.so.2*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/paper.h
|
|
|
|
|
%{_libdir}/libpaper.so
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
|
|
%files -n paper
|
|
|
|
|
%{_bindir}/paper
|
|
|
|
|
%{_bindir}/paperconf
|
|
|
|
|
%{_libexecdir}/localepaper
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.28-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:2.1.1-6
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Mon May 13 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1.1-5
|
|
|
|
|
- remove gnulib dependency and use bundled one
|
|
|
|
|
|
|
|
|
|
* Tue Apr 23 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1.1-4
|
|
|
|
|
- RHEL-33500 - apply hardening ldflags for localepaper
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 25 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1.1-1
|
|
|
|
|
- 2.1.1
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 14 2023 Tom Callaway <spot@fedoraproject.org> - 1:2.1.0-1
|
|
|
|
|
- update to 2.1.0
|
|
|
|
|
|
|
|
|
|
* Fri Mar 3 2023 Tom Callaway <spot@fedoraproject.org> - 1:2.0.10-1
|
|
|
|
|
- update to 2.0.10
|
|
|
|
|
|
|
|
|
|
* Thu Feb 23 2023 Tom Callaway <spot@fedoraproject.org> - 1:2.0.9-1
|
|
|
|
|
- update to 2.0.9
|
|
|
|
|
|
|
|
|
|
* Tue Feb 14 2023 Tom Callaway <spot@fedoraproject.org> - 1:2.0.8-1
|
|
|
|
|
- update to 2.0.8
|
|
|
|
|
|
|
|
|
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.4-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 9 2023 Tom Callaway <spot@fedoraproject.org> - 2.0.4-2
|
|
|
|
|
- move /etc/paperspecs to libpaper to ensure proper functionality in cases where paper subpackage
|
|
|
|
|
is not installed
|
|
|
|
|
- fix Requires to include epoch
|
|
|
|
|
|
|
|
|
|
* Sun Jan 8 2023 Tom Callaway <spot@fedoraproject.org> - 2.0.4-1
|
|
|
|
|
- update to 2.0.4
|
|
|
|
|
|
|
|
|
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.28-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.28-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.28-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.28-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.28-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|