| 1 | #define svn_url e:/trees/gutenprint/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/gutenprint/trunk
|
|---|
| 3 | %define svn_rev 1565
|
|---|
| 4 |
|
|---|
| 5 | Name: gutenprint
|
|---|
| 6 | Summary: Printer Drivers Package
|
|---|
| 7 | Version: 5.2.11
|
|---|
| 8 | Release: 3%{?dist}
|
|---|
| 9 | URL: http://gimp-print.sourceforge.net/
|
|---|
| 10 | License: GPLv2+
|
|---|
| 11 | Vendor: bww bitwise works GmbH
|
|---|
| 12 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 13 |
|
|---|
| 14 | Requires: %{name}-libs = %{version}-%{release}
|
|---|
| 15 | BuildRequires: cups-libs, cups-devel, cups
|
|---|
| 16 | BuildRequires: gettext-devel,pkgconfig
|
|---|
| 17 | BuildRequires: libtiff-devel,libjpeg-devel,libpng-devel
|
|---|
| 18 | BuildRequires: libusb1-devel
|
|---|
| 19 | #BuildRequires: foomatic
|
|---|
| 20 | BuildRequires: ghostscript-devel
|
|---|
| 21 |
|
|---|
| 22 | # Make sure we get postscriptdriver tags.
|
|---|
| 23 | #BuildRequires: python3-cups
|
|---|
| 24 |
|
|---|
| 25 | # autoreconf
|
|---|
| 26 | BuildRequires: autoconf automake libtool
|
|---|
| 27 |
|
|---|
| 28 | ## NOTE ##
|
|---|
| 29 | # The README file in this package contains suggestions from upstream
|
|---|
| 30 | # on how to package this software. I'd be inclined to follow those
|
|---|
| 31 | # suggestions unless there's a good reason not to do so.
|
|---|
| 32 |
|
|---|
| 33 | %description
|
|---|
| 34 | Gutenprint is a package of high quality printer drivers for Linux, BSD,
|
|---|
| 35 | Solaris, IRIX, and other UNIX-alike operating systems.
|
|---|
| 36 | Gutenprint was formerly called Gimp-Print.
|
|---|
| 37 |
|
|---|
| 38 | %package doc
|
|---|
| 39 | Summary: Documentation for gutenprint
|
|---|
| 40 |
|
|---|
| 41 | %description doc
|
|---|
| 42 | Documentation for gutenprint.
|
|---|
| 43 |
|
|---|
| 44 | %package libs
|
|---|
| 45 | Summary: libgutenprint library
|
|---|
| 46 |
|
|---|
| 47 | %description libs
|
|---|
| 48 | This package includes libgutenprint library, necessary to run gutenprint.
|
|---|
| 49 |
|
|---|
| 50 | %package devel
|
|---|
| 51 | Summary: Library development files for gutenprint
|
|---|
| 52 | Requires: %{name} = %{version}-%{release}
|
|---|
| 53 |
|
|---|
| 54 | %description devel
|
|---|
| 55 | This package contains headers and libraries required to build applications that
|
|---|
| 56 | uses gutenprint package.
|
|---|
| 57 |
|
|---|
| 58 | #package foomatic
|
|---|
| 59 | #Summary: Foomatic printer database information for gutenprint
|
|---|
| 60 | #Requires: %{name} = %{version}-%{release}
|
|---|
| 61 | #Requires(post): foomatic
|
|---|
| 62 | # python3-cups is required for the update script (bug #1226871)
|
|---|
| 63 | #Requires(post): python3-cups
|
|---|
| 64 | #Requires: foomatic-db
|
|---|
| 65 |
|
|---|
| 66 | #description foomatic
|
|---|
| 67 | #This package contains a database of printers,printer drivers,
|
|---|
| 68 | #and driver descriptions.
|
|---|
| 69 |
|
|---|
| 70 | %package extras
|
|---|
| 71 | Summary: Sample test pattern generator for gutenprint-devel
|
|---|
| 72 | Requires: %{name} = %{version}-%{release}
|
|---|
| 73 |
|
|---|
| 74 | %description extras
|
|---|
| 75 | This package contains test pattern generator and the sample test pattern
|
|---|
| 76 | that is used by gutenprint-devel package.
|
|---|
| 77 |
|
|---|
| 78 | %package cups
|
|---|
| 79 | Summary: CUPS drivers for Canon, Epson, HP and compatible printers
|
|---|
| 80 | Requires: cups
|
|---|
| 81 | Requires: %{name} = %{version}-%{release}
|
|---|
| 82 |
|
|---|
| 83 | %description cups
|
|---|
| 84 | This package contains native CUPS support for a wide range of Canon,
|
|---|
| 85 | Epson, HP and compatible printers.
|
|---|
| 86 |
|
|---|
| 87 | %debug_package
|
|---|
| 88 |
|
|---|
| 89 | %prep
|
|---|
| 90 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 91 | %setup -q
|
|---|
| 92 | %else
|
|---|
| 93 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 94 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 95 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 96 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 97 | %endif
|
|---|
| 98 |
|
|---|
| 99 | %build
|
|---|
| 100 | # rebuild all configure and the like files
|
|---|
| 101 | export NOCONFIGURE=1
|
|---|
| 102 | autogen.sh
|
|---|
| 103 |
|
|---|
| 104 | export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 105 | # --with-foomatic
|
|---|
| 106 | %configure --disable-static --enable-shared \
|
|---|
| 107 | --with-modules=no --with-ghostscript \
|
|---|
| 108 | --enable-samples --enable-escputil \
|
|---|
| 109 | --enable-test --disable-rpath \
|
|---|
| 110 | --enable-cups-1_2-enhancements \
|
|---|
| 111 | --disable-cups-ppds \
|
|---|
| 112 | --enable-simplified-cups-ppds
|
|---|
| 113 |
|
|---|
| 114 | # this export is needed, as else the dll for the tests are not found
|
|---|
| 115 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/src/main/.libs
|
|---|
| 116 | make %{?_smp_mflags}
|
|---|
| 117 |
|
|---|
| 118 | %check
|
|---|
| 119 | # Test suite disabled due to too long runtime
|
|---|
| 120 | # this export is needed, as else the dll for the tests are not found
|
|---|
| 121 | #export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/src/main/.libs
|
|---|
| 122 | #make check
|
|---|
| 123 |
|
|---|
| 124 | %install
|
|---|
| 125 | make DESTDIR=%{buildroot} install
|
|---|
| 126 |
|
|---|
| 127 | # Don't ship libtool la files.
|
|---|
| 128 | rm -f %{buildroot}%{_libdir}/lib*.la
|
|---|
| 129 |
|
|---|
| 130 | rm -rf %{buildroot}%{_datadir}/gutenprint/doc
|
|---|
| 131 | rm -f %{buildroot}%{_datadir}/foomatic/kitload.log
|
|---|
| 132 | rm -f %{buildroot}%{_sysconfdir}/cups/command.types
|
|---|
| 133 |
|
|---|
| 134 | %find_lang %{name}
|
|---|
| 135 | sed 's!%{_datadir}/locale/\([^/]*\)/LC_MESSAGES/gutenprint.mo!%{_datadir}/locale/\1/gutenprint_\1.po!g' %{name}.lang >%{name}-po.lang
|
|---|
| 136 | rm -f %{name}.lang
|
|---|
| 137 | %find_lang %{name} --all-name
|
|---|
| 138 | cat %{name}-po.lang >>%{name}.lang
|
|---|
| 139 |
|
|---|
| 140 | echo .so man1/ijsgutenprint.1 > %{buildroot}%{_mandir}/man1/ijsgutenprint.5.2.1
|
|---|
| 141 | echo .so man8/cups-genppd.8 > %{buildroot}%{_mandir}/man8/cups-genppd.5.2.8
|
|---|
| 142 |
|
|---|
| 143 | #post libs -p /sbin/ldconfig
|
|---|
| 144 |
|
|---|
| 145 | #postun libs -p /sbin/ldconfig
|
|---|
| 146 |
|
|---|
| 147 | %post cups
|
|---|
| 148 | %{_sbindir}/cups-genppdupdate >/dev/null 2>&1 || :
|
|---|
| 149 | #/sbin/service cups reload >/dev/null 2>&1 || :
|
|---|
| 150 | exit 0
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 | %files -f %{name}.lang
|
|---|
| 154 | %doc COPYING
|
|---|
| 155 | %{_bindir}/escputil.exe
|
|---|
| 156 | %{_mandir}/man1/escputil.1*
|
|---|
| 157 | %{_bindir}/ijsgutenprint.5.2.exe
|
|---|
| 158 | %{_mandir}/man1/ijsgutenprint.5.2.1*
|
|---|
| 159 | %{_mandir}/man1/ijsgutenprint.1*
|
|---|
| 160 | %{_datadir}/gutenprint/5.2
|
|---|
| 161 |
|
|---|
| 162 | %files doc
|
|---|
| 163 | %doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf
|
|---|
| 164 |
|
|---|
| 165 | %files libs
|
|---|
| 166 | %{_libdir}/gutenpr*.dll
|
|---|
| 167 |
|
|---|
| 168 | %files devel
|
|---|
| 169 | %doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf
|
|---|
| 170 | %doc doc/gutenprint
|
|---|
| 171 | %{_includedir}/gutenprint/
|
|---|
| 172 | %{_libdir}/*.a
|
|---|
| 173 | %{_libdir}/pkgconfig/gutenprint.pc
|
|---|
| 174 |
|
|---|
| 175 | #%files foomatic
|
|---|
| 176 | #doc
|
|---|
| 177 | #{_sbindir}/gutenprint-foomaticppdupdate
|
|---|
| 178 | #{_mandir}/man8/gutenprint-foomaticppdupdate.8*
|
|---|
| 179 | #{_datadir}/foomatic/db/source/driver/*
|
|---|
| 180 | #{_datadir}/foomatic/db/source/opt/*
|
|---|
| 181 |
|
|---|
| 182 | %files extras
|
|---|
| 183 | %doc
|
|---|
| 184 | %{_bindir}/testpattern.exe
|
|---|
| 185 | %{_datadir}/gutenprint/samples/*
|
|---|
| 186 |
|
|---|
| 187 | %files cups
|
|---|
| 188 | %doc
|
|---|
| 189 | %{_datadir}/cups/calibrate.ppm
|
|---|
| 190 | %{_datadir}/cups/usb/net.sf.gimp-print.usb-quirks
|
|---|
| 191 | %{_cups_serverbin}/filter/*.exe
|
|---|
| 192 | %{_cups_serverbin}/driver/*.exe
|
|---|
| 193 | %{_cups_serverbin}/backend/*.exe
|
|---|
| 194 | %{_bindir}/cups-calibrate.exe
|
|---|
| 195 | %{_sbindir}/cups-genppd*.exe
|
|---|
| 196 | %{_sbindir}/cups-genppdupdate
|
|---|
| 197 | %{_mandir}/man8/cups-calibrate.8*
|
|---|
| 198 | %{_mandir}/man8/cups-genppd*.8*
|
|---|
| 199 |
|
|---|
| 200 | #post foomatic
|
|---|
| 201 | #rm -f /var/cache/foomatic/*
|
|---|
| 202 | #if [ $1 -eq 2 ]; then
|
|---|
| 203 | # %{_sbindir}/gutenprint-foomaticppdupdate %{version} >/dev/null 2>&1 || :
|
|---|
| 204 | #fi
|
|---|
| 205 |
|
|---|
| 206 | #postun foomatic
|
|---|
| 207 | #rm -f /var/cache/foomatic/*
|
|---|
| 208 |
|
|---|
| 209 | %changelog
|
|---|
| 210 | * Fri May 13 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 5.2.11-3
|
|---|
| 211 | - escape /@unixroot right and add binmode to cups-genppdupdate script
|
|---|
| 212 | - fix cups-genppdupdate to find the driver_bin
|
|---|
| 213 |
|
|---|
| 214 | * Thu Apr 21 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 5.2.11-2
|
|---|
| 215 | - remove Zbin-files
|
|---|
| 216 |
|
|---|
| 217 | * Tue Mar 22 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 5.2.11-1
|
|---|
| 218 | - first version
|
|---|