|
@@ -1,12 +1,9 @@
|
|
|
-%define dbver_rel 4.0
|
|
|
-%define dbver_snap 20150415
|
|
|
%define enginever 4.0.12
|
|
|
-%define filtersver 4.0-20150415
|
|
|
|
|
|
Summary: Foomatic printer database.
|
|
|
Name: foomatic
|
|
|
Version: %{enginever}
|
|
|
-Release: 1%{?_dist_release}
|
|
|
+Release: 2%{?_dist_release}
|
|
|
License: GPL
|
|
|
Group: System Environment/Libraries
|
|
|
|
|
@@ -15,23 +12,21 @@ Distribution: Vine Linux
|
|
|
Packager: tomop, daisuke, machino
|
|
|
|
|
|
Source0: http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-%{enginever}.tar.gz
|
|
|
-Source1: http://www.linuxprinting.org/download/foomatic/foomatic-filters-%{filtersver}.tar.gz
|
|
|
-Source2: http://www.linuxprinting.org/download/foomatic/foomatic-db-%{dbver_rel}-%{dbver_snap}.tar.gz
|
|
|
|
|
|
-# Use libdir.
|
|
|
-Patch1: foomatic-filters-libdir.patch
|
|
|
-Patch2: foomatic-db-engine-libdir.patch
|
|
|
-
|
|
|
-# Handle non-UTF-8 encodings in imported PPD files.
|
|
|
-Patch15: foomatic-bad-utf8.patch
|
|
|
+Patch101: foomatic-manpages.patch
|
|
|
|
|
|
Url: http://www.linuxprinting.org
|
|
|
-Requires: perl >= 5.12.3
|
|
|
-Requires: %(eval `perl -V:version`; echo "perl(:MODULE_COMPAT_$version)")
|
|
|
+Requires: cups-filters
|
|
|
+Requires: dbus
|
|
|
+Requires: foomatic-db
|
|
|
Requires: hplip
|
|
|
+Requires: %(eval `perl -V:version`; echo "perl(:MODULE_COMPAT_$version)")
|
|
|
+# For 'rm' and '/sbin/service' in post
|
|
|
+Requires: fileutils initscripts
|
|
|
+
|
|
|
+BuildRequires: cups
|
|
|
BuildRequires: perl >= 5.12.3
|
|
|
BuildRequires: libxml2-devel
|
|
|
-BuildRequires: ghostscript-devel
|
|
|
BuildRequires: autoconf, automake
|
|
|
BuildRequires: mpage
|
|
|
BuildRequires: dbus-devel
|
|
@@ -39,11 +34,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
Provides: perl(Foomatic::GrovePath)
|
|
|
# For 'rm' and '/sbin/service' in post
|
|
|
Requires(pre): coreutils initscripts
|
|
|
-Obsoletes: foomatic-db < 4.0.0
|
|
|
-Obsoletes: foomatic-ppd < 4.0.0
|
|
|
-Obsoletes: foomatic-ppd-gimp-print < 4.0.0
|
|
|
-Obsoletes: foomatic-ppd-gimp-print-ijs < 4.0.0
|
|
|
-Obsoletes: foomatic-ppd-omni < 4.0.0
|
|
|
+Obsoletes: foomatic-db < 4.0
|
|
|
+Obsoletes: foomatic-ppd < 4.0
|
|
|
+Obsoletes: foomatic-ppd-gimp-print < 4.0
|
|
|
+Obsoletes: foomatic-ppd-gimp-print-ijs < 4.0
|
|
|
+Obsoletes: foomatic-ppd-omni < 4.0
|
|
|
|
|
|
# We need ghostscript to have the gimp-print-4.2.0 driver, and hpijs 1.1.
|
|
|
Conflicts: ghostscript < 7.05
|
|
@@ -63,43 +58,12 @@ queues (foomatic-configure) and to print files/manipulate jobs
|
|
|
The site http://www.linuxprinting.org/ is based on this database.
|
|
|
|
|
|
%prep
|
|
|
-%setup -q -c -a 1 -a 2
|
|
|
+%setup -q -n foomatic-db-engine-%{version}
|
|
|
|
|
|
-#pushd foomatic-filters-%{filtersver}
|
|
|
-#%patch1 -p1 -b .libdir
|
|
|
-#popd
|
|
|
+# Ship more manpages.
|
|
|
+%patch101 -p1 -b .manpages
|
|
|
|
|
|
-pushd foomatic-db-engine-%{enginever}
|
|
|
chmod a+x mkinstalldirs
|
|
|
-#%patch2 -p1 -b .libdir
|
|
|
-#%patch15 -p1
|
|
|
-popd
|
|
|
-
|
|
|
-pushd foomatic-db-%{dbver_snap}
|
|
|
-
|
|
|
-cd db/source
|
|
|
-
|
|
|
-# For gutenprint printers, use gutenprint-ijs-simplified.5.2.
|
|
|
-perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' printer/*.xml
|
|
|
-
|
|
|
-# Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851).
|
|
|
-# Also foo2lava, foo2kyo, foo2xqx (bug #438319).
|
|
|
-for x in zjs oak hp qpdl lava kyo xqx
|
|
|
-do
|
|
|
- find printer -name '*.xml' |xargs grep -l "<driver>foo2${x}"|xargs rm -vf
|
|
|
- rm -f driver/foo2${x}.xml opt/foo2${x}-*
|
|
|
-done
|
|
|
-# Same for m2300w/m2400w
|
|
|
-find printer -name '*.xml' |xargs grep -l '<driver>m2[34]00w<'|xargs rm -vf
|
|
|
-rm -f driver/m2300w.xml driver/m2400w.xml opt/m2300w-*
|
|
|
-# Same for all these.
|
|
|
-for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j
|
|
|
-do
|
|
|
- find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
|
|
|
- rm -vf driver/${x}.xml opt/${x}-*
|
|
|
-done
|
|
|
-
|
|
|
-popd
|
|
|
|
|
|
%build
|
|
|
export LIB_CUPS=%{_libdir}/cups
|
|
@@ -107,103 +71,34 @@ export CUPS_BACKENDS=%{_libdir}/cups/backend
|
|
|
export CUPS_FILTERS=%{_libdir}/cups/filter
|
|
|
export CUPS_PPDS=%{_datadir}/cups/model
|
|
|
|
|
|
-pushd foomatic-filters-%{filtersver}
|
|
|
-./make_configure
|
|
|
-%configure
|
|
|
-make %{_smp_mflags} PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
- INSTALLDIRS=vendor
|
|
|
-popd
|
|
|
-
|
|
|
-pushd foomatic-db-engine-%{enginever}
|
|
|
+aclocal
|
|
|
+autoconf
|
|
|
%configure --disable-xmltest
|
|
|
-make %{_smp_mflags} PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
- INSTALLDIRS=vendor defaults
|
|
|
-make %{_smp_mflags} PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
- INSTALLDIRS=vendor
|
|
|
-popd
|
|
|
-
|
|
|
-pushd foomatic-db-%{dbver_snap}
|
|
|
-%configure
|
|
|
-make %{_smp_mflags} PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
- INSTALLDIRS=vendor
|
|
|
-popd
|
|
|
+make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
|
|
%install
|
|
|
-rm -rf %{buildroot}
|
|
|
-
|
|
|
-pushd foomatic-filters-%{filtersver}
|
|
|
-eval `perl '-V:installvendorlib' '-V:installvendorarch'`
|
|
|
-mkdir -p %{buildroot}/$installvendorlib
|
|
|
-
|
|
|
-
|
|
|
-echo %{buildroot}
|
|
|
-
|
|
|
-make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
|
|
|
- INSTALLDIRS=vendor \
|
|
|
- INSTALLVENDORLIB=$installvendorlib \
|
|
|
- INSTALLVENDORARCH=$installvendorarch \
|
|
|
- install-main install-cups
|
|
|
-popd
|
|
|
-
|
|
|
-pushd foomatic-db-engine-%{enginever}
|
|
|
make DESTDIR=%buildroot PREFIX=%{_prefix} \
|
|
|
- INSTALLDIRS=vendor \
|
|
|
- INSTALLVENDORLIB=$installvendorlib \
|
|
|
- INSTALLVENDORARCH=$installvendorarch \
|
|
|
+ INSTALLSITELIB=%{perl_vendorlib} \
|
|
|
+ INSTALLSITEARCH=%{perl_vendorarch} \
|
|
|
install
|
|
|
-popd
|
|
|
-
|
|
|
-pushd foomatic-db-%{dbver_snap}
|
|
|
-make DESTDIR=%buildroot PREFIX=%{_prefix} \
|
|
|
- INSTALLDIRS=vendor \
|
|
|
- INSTALLVENDORLIB=$installvendorlib \
|
|
|
- INSTALLVENDORARCH=$installvendorarch \
|
|
|
- install
|
|
|
-popd
|
|
|
-
|
|
|
-# Remove ghostscript UPP drivers that are gone in 7.07
|
|
|
-rm -f %buildroot%{_datadir}/foomatic/db/source/driver/{bjc6000a1,PM760p,PM820p,s400a1,sharp,Stc670pl,Stc670p,Stc680p,Stc760p,Stc777p,Stp720p,Stp870p}.upp.xml
|
|
|
-
|
|
|
-# Remove drivers with no command line.
|
|
|
-pushd foomatic-db-engine-%{enginever}
|
|
|
-perl -Ilib ./foomatic-cleanupdrivers %buildroot%{_datadir}/foomatic
|
|
|
-popd
|
|
|
-
|
|
|
-# Update any old-style printer IDs still left around.
|
|
|
-echo '#!/usr/bin/perl -pi' > convert-printerids.pl
|
|
|
-sed -e 's|^\(.*\) \(.*\)$|s,printer/\1,printer/\2,g;|' \
|
|
|
- %{buildroot}%{_datadir}/foomatic/db/oldprinterids \
|
|
|
- >> convert-printerids.pl
|
|
|
-chmod a+x convert-printerids.pl
|
|
|
-./convert-printerids.pl %{buildroot}%{_datadir}/foomatic/db/source/{opt,driver}/*.xml
|
|
|
-find %{buildroot}%{_datadir}/foomatic/db/source/ -type f | xargs chmod 0644
|
|
|
-
|
|
|
-# Use relative, not absolute, symlink for CUPS filter.
|
|
|
-ln -sf ../../../bin/foomatic-rip %{buildroot}%{_libdir}/cups/filter/foomatic-rip
|
|
|
|
|
|
# Use relative, not absolute, symlink for CUPS driver.
|
|
|
-mkdir -p %{buildroot}%{_libdir}/cups/driver
|
|
|
ln -sf ../../../bin/foomatic-ppdfile %{buildroot}%{_libdir}/cups/driver/foomatic
|
|
|
|
|
|
-mkdir %{buildroot}%{_datadir}/foomatic/db/source/PPD/Custom
|
|
|
mkdir -p %{buildroot}%{_var}/cache/foomatic
|
|
|
|
|
|
echo cups > %{buildroot}%{_sysconfdir}/foomatic/defaultspooler
|
|
|
|
|
|
# Remove things we don't ship.
|
|
|
-rm -rf %{buildroot}%{_libdir}/perl5/site_perl \
|
|
|
- %{buildroot}%{_libdir}/ppr \
|
|
|
- %{buildroot}%{_sysconfdir}/foomatic/filter.conf.sample
|
|
|
-find %{buildroot} -name .packlist -o -name '*.xml.*' | xargs rm -f
|
|
|
-
|
|
|
+rm -rf \
|
|
|
+ %{buildroot}%{_libdir}/ppr \
|
|
|
+ %{buildroot}%{_sysconfdir}/foomatic/filter.conf.sample \
|
|
|
+ %{buildroot}%{_datadir}/foomatic/templates
|
|
|
+#%{buildroot}%%{_libdir}/perl5/site_perl
|
|
|
+find %{buildroot} -name .packlist | xargs rm -f
|
|
|
|
|
|
%post
|
|
|
/bin/rm -f /var/cache/foomatic/*
|
|
|
-
|
|
|
-# restart the print server if it is running now
|
|
|
-/sbin/service lpd condrestart >/dev/null 2>&1
|
|
|
-/sbin/service cups condrestart >/dev/null 2>&1
|
|
|
-
|
|
|
exit 0
|
|
|
|
|
|
%clean
|
|
@@ -211,22 +106,22 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name}
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%doc --parents */README */USAGE */ChangeLog
|
|
|
+%doc ChangeLog COPYING README TODO
|
|
|
%dir %{_sysconfdir}/foomatic
|
|
|
-%config(noreplace) %{_sysconfdir}/foomatic/filter.conf
|
|
|
%config(noreplace) %{_sysconfdir}/foomatic/defaultspooler
|
|
|
%{_bindir}/*
|
|
|
%{_sbindir}/*
|
|
|
%{perl_vendorlib}/Foomatic
|
|
|
-%{_libdir}/cups/backend/*
|
|
|
%{_libdir}/cups/driver/*
|
|
|
-%{_libdir}/cups/filter/*
|
|
|
%{_datadir}/foomatic
|
|
|
-%{_datadir}/cups/model/foomatic-db-ppds
|
|
|
%{_mandir}/*/*
|
|
|
%{_var}/cache/foomatic
|
|
|
|
|
|
%changelog
|
|
|
+* Sun Oct 4 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.12-2
|
|
|
+- removed foomatic-filters (moved to cups-filters).
|
|
|
+- moved foomatic-db as a standalone package.
|
|
|
+
|
|
|
* Tue Jun 9 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.12-1
|
|
|
- new upstream release.
|
|
|
|