| 1 | #define svn_url e:/trees/hplip/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/hplip/trunk
|
|---|
| 3 | %define svn_rev 1600
|
|---|
| 4 |
|
|---|
| 5 | %define without_sane 1
|
|---|
| 6 | %define without_dbus 1
|
|---|
| 7 | %define without_fax 1
|
|---|
| 8 |
|
|---|
| 9 | Summary: HP Linux Imaging and Printing Project
|
|---|
| 10 | Name: hplip
|
|---|
| 11 | Version: 3.16.3
|
|---|
| 12 | Release: 1%{?dist}
|
|---|
| 13 | License: GPLv2+ and MIT and BSD
|
|---|
| 14 |
|
|---|
| 15 | Url: http://hplip.sourceforge.net/
|
|---|
| 16 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 17 | Vendor: bww bitwise works GmbH
|
|---|
| 18 |
|
|---|
| 19 | # @todo: decide if we need that to
|
|---|
| 20 | # if we do it as well, also remove the coment in the post section
|
|---|
| 21 | #Source1: hpcups-update-ppds.sh
|
|---|
| 22 |
|
|---|
| 23 | Requires: %{name}-libs = %{version}-%{release}
|
|---|
| 24 | #Requires: python-pillow
|
|---|
| 25 | Requires: cups
|
|---|
| 26 | #Requires: wget
|
|---|
| 27 | %if 0%{!?without_dbus:1}
|
|---|
| 28 | Requires: python-dbus
|
|---|
| 29 | %endif
|
|---|
| 30 | #Requires: gnupg
|
|---|
| 31 | # /usr/lib/udev/rules.d
|
|---|
| 32 | #Requires: systemd
|
|---|
| 33 |
|
|---|
| 34 | BuildRequires: autoconf automake libtool
|
|---|
| 35 | #BuildRequires: net-snmp-devel
|
|---|
| 36 | BuildRequires: cups-devel
|
|---|
| 37 | BuildRequires: python-devel
|
|---|
| 38 | BuildRequires: libjpeg-devel
|
|---|
| 39 | #BuildRequires: desktop-file-utils
|
|---|
| 40 | BuildRequires: libusb1-devel
|
|---|
| 41 | BuildRequires: openssl-devel
|
|---|
| 42 | %if 0%{!?without_sane:1}
|
|---|
| 43 | BuildRequires: sane-backends-devel
|
|---|
| 44 | %endif
|
|---|
| 45 | %if 0%{!?without_dbus:1}
|
|---|
| 46 | BuildRequires: pkgconfig(dbus-1)
|
|---|
| 47 | %endif
|
|---|
| 48 |
|
|---|
| 49 | # Make sure we get postscriptdriver tags.
|
|---|
| 50 | #BuildRequires: python-cups
|
|---|
| 51 |
|
|---|
| 52 | # macros: %%{_tmpfilesdir}, %%{_udevrulesdir}
|
|---|
| 53 | #BuildRequires: systemd
|
|---|
| 54 |
|
|---|
| 55 | # hpijs was merged into main package in 3.15.7-2
|
|---|
| 56 | Obsoletes: hpijs < 1:%{version}-%{release}
|
|---|
| 57 | Provides: hpijs = 1:%{version}-%{release}
|
|---|
| 58 |
|
|---|
| 59 | %description
|
|---|
| 60 | The Hewlett-Packard Linux Imaging and Printing Project provides
|
|---|
| 61 | drivers for HP printers and multi-function peripherals.
|
|---|
| 62 |
|
|---|
| 63 | %package common
|
|---|
| 64 | Summary: Files needed by the HPLIP printer and scanner drivers
|
|---|
| 65 | License: GPLv2+
|
|---|
| 66 |
|
|---|
| 67 | %description common
|
|---|
| 68 | Files needed by the HPLIP printer and scanner drivers.
|
|---|
| 69 |
|
|---|
| 70 | %package libs
|
|---|
| 71 | Summary: HPLIP libraries
|
|---|
| 72 | License: GPLv2+ and MIT
|
|---|
| 73 | Requires: %{name}-common = %{version}-%{release}
|
|---|
| 74 | Requires: python
|
|---|
| 75 | Obsoletes: %{name}-compat-libs < %{version}-%{release}
|
|---|
| 76 |
|
|---|
| 77 | %description libs
|
|---|
| 78 | Libraries needed by HPLIP.
|
|---|
| 79 |
|
|---|
| 80 | %package gui
|
|---|
| 81 | Summary: HPLIP graphical tools
|
|---|
| 82 | License: BSD
|
|---|
| 83 | Requires: python-PyQt4
|
|---|
| 84 | Requires: python-reportlab
|
|---|
| 85 | # hpssd.py
|
|---|
| 86 | #Requires: python-gobject
|
|---|
| 87 | Requires: %{name} = %{version}-%{release}
|
|---|
| 88 | %if 0%{!?without_sane:1}
|
|---|
| 89 | Requires: libsane-hpaio = %{version}-%{release}
|
|---|
| 90 | %endif
|
|---|
| 91 |
|
|---|
| 92 | %description gui
|
|---|
| 93 | HPLIP graphical tools.
|
|---|
| 94 |
|
|---|
| 95 | %if 0%{!?without_sane:1}
|
|---|
| 96 | %package -n libsane-hpaio
|
|---|
| 97 | Summary: SANE driver for scanners in HP's multi-function devices
|
|---|
| 98 | License: GPLv2+
|
|---|
| 99 | Obsoletes: libsane-hpoj < 0.91
|
|---|
| 100 | Provides: libsane-hpoj = 0.91
|
|---|
| 101 | Requires: sane-backends
|
|---|
| 102 | Requires: %{name}-libs = %{version}-%{release}
|
|---|
| 103 |
|
|---|
| 104 | %description -n libsane-hpaio
|
|---|
| 105 | SANE driver for scanners in HP's multi-function devices (from HPOJ).
|
|---|
| 106 | %endif
|
|---|
| 107 |
|
|---|
| 108 | %debug_package
|
|---|
| 109 |
|
|---|
| 110 | %prep
|
|---|
| 111 | %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}
|
|---|
| 112 | %setup -q
|
|---|
| 113 | %else
|
|---|
| 114 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 115 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 116 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 117 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 118 | %endif
|
|---|
| 119 |
|
|---|
| 120 |
|
|---|
| 121 | %build
|
|---|
| 122 | # Work-around Makefile.am imperfections.
|
|---|
| 123 | sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
|
|---|
| 124 | # Upstream uses old libtool, which causes problems (due to libhpmud requiring
|
|---|
| 125 | # libhpdiscovery) when we try to remove rpath from it.
|
|---|
| 126 | # Regenerating all autotools files works-around these rpath issues.
|
|---|
| 127 | autoreconf --verbose --force --install
|
|---|
| 128 |
|
|---|
| 129 | %configure \
|
|---|
| 130 | %if 0%{!?without_sane:1}
|
|---|
| 131 | --enable-scan-build \
|
|---|
| 132 | %else
|
|---|
| 133 | --disable-scan-build \
|
|---|
| 134 | %endif
|
|---|
| 135 | --enable-gui-build \
|
|---|
| 136 | --disable-foomatic-rip-hplip-install \
|
|---|
| 137 | --enable-qt4 --enable-hpcups-install --enable-cups-drv-install \
|
|---|
| 138 | --enable-foomatic-drv-install \
|
|---|
| 139 | --enable-hpijs-install \
|
|---|
| 140 | %if 0%{!?without_fax:1}
|
|---|
| 141 | --enable-fax-build \
|
|---|
| 142 | %else
|
|---|
| 143 | --enable-fax-build=no \
|
|---|
| 144 | --enable-dbus-build=no \
|
|---|
| 145 | %endif
|
|---|
| 146 | %if 0%{?without_dbus:1}
|
|---|
| 147 | --enable-dbus-build=no \
|
|---|
| 148 | %endif
|
|---|
| 149 | --disable-policykit --with-mimedir=%{_datadir}/cups/mime \
|
|---|
| 150 | --disable-network-build --enable-shared --disable-static \
|
|---|
| 151 | --with-cupsbackenddir=%{_cups_serverbin}/backend \
|
|---|
| 152 | --with-cupsfilterdir=%{_cups_serverbin}/filter \
|
|---|
| 153 | --with-icondir=%{_datadir}/applications \
|
|---|
| 154 | --with-systraydir=%{_sysconfdir}/xdg/autostart
|
|---|
| 155 |
|
|---|
| 156 | make %{?_smp_mflags}
|
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 | %install
|
|---|
| 160 | mkdir -p %{buildroot}%{_bindir}
|
|---|
| 161 | make install DESTDIR=%{buildroot}
|
|---|
| 162 |
|
|---|
| 163 | # Remove unpackaged files
|
|---|
| 164 | rm -rf %{buildroot}%{_sysconfdir}/sane.d \
|
|---|
| 165 | %{buildroot}%{_docdir} \
|
|---|
| 166 | %{buildroot}%{_datadir}/hal \
|
|---|
| 167 | %{buildroot}%{_datadir}/hplip/pkservice.py \
|
|---|
| 168 | %{buildroot}%{_bindir}/hp-pkservice \
|
|---|
| 169 | %{buildroot}%{_datadir}/applications \
|
|---|
| 170 |
|
|---|
| 171 | rm -f %{buildroot}%{_bindir}/hp-logcapture \
|
|---|
| 172 | %{buildroot}%{_bindir}/hp-doctor \
|
|---|
| 173 | %{buildroot}%{_datadir}/hplip/logcapture.py \
|
|---|
| 174 | %{buildroot}%{_datadir}/hplip/doctor.py
|
|---|
| 175 |
|
|---|
| 176 | rm -f %{buildroot}%{_bindir}/foomatic-rip \
|
|---|
| 177 | %{buildroot}%{_libdir}/cups/filter/foomatic-rip \
|
|---|
| 178 | %{buildroot}%{_libdir}/*.la \
|
|---|
| 179 | %{buildroot}%{python_sitearch}/*.la \
|
|---|
| 180 | %{buildroot}%{_libdir}/sane/*.la \
|
|---|
| 181 | %{buildroot}%{_datadir}/cups/model/foomatic-ppds \
|
|---|
| 182 | %{buildroot}%{_datadir}/ppd/HP/*.ppd
|
|---|
| 183 |
|
|---|
| 184 |
|
|---|
| 185 | # Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
|
|---|
| 186 | #install -p -m755 %{SOURCE1} %{buildroot}%{_bindir}/hpcups-update-ppds
|
|---|
| 187 |
|
|---|
| 188 | # Images in docdir should not be executable (bug #440552).
|
|---|
| 189 | find doc/images -type f -exec chmod 644 {} \;
|
|---|
| 190 |
|
|---|
| 191 | # Create an empty plugins directory to make sure it gets the right
|
|---|
| 192 | # SELinux file context (bug #564551).
|
|---|
| 193 | %{__mkdir_p} %{buildroot}%{_datadir}/hplip/prnt/plugins
|
|---|
| 194 |
|
|---|
| 195 | # Create an empty var/run/hplip directory
|
|---|
| 196 | %{__mkdir_p} %{buildroot}%{_localstatedir}/run/hplip
|
|---|
| 197 |
|
|---|
| 198 | # Remove files we don't want to package.
|
|---|
| 199 | rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc
|
|---|
| 200 | rm -f %{buildroot}%{_datadir}/hplip/hplip-install
|
|---|
| 201 | rm -rf %{buildroot}%{_datadir}/hplip/install.*
|
|---|
| 202 | rm -f %{buildroot}%{_datadir}/hplip/uninstall.*
|
|---|
| 203 | rm -f %{buildroot}%{_bindir}/hp-uninstall
|
|---|
| 204 | rm -f %{buildroot}%{_datadir}/hplip/upgrade.*
|
|---|
| 205 | rm -f %{buildroot}%{_bindir}/hp-upgrade
|
|---|
| 206 | rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template
|
|---|
| 207 | rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types
|
|---|
| 208 | rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff*
|
|---|
| 209 | rm -rf %{buildroot}%{_libdir}/systemd
|
|---|
| 210 |
|
|---|
| 211 | # The systray applet doesn't work properly (displays icon as a
|
|---|
| 212 | # window), so don't ship the launcher yet.
|
|---|
| 213 | rm -rf %{buildroot}%{_sysconfdir}/xdg
|
|---|
| 214 |
|
|---|
| 215 | # as there is no devel package we don't ship the *.a files either
|
|---|
| 216 | rm -f %{buildroot}%{_libdir}/*.a \
|
|---|
| 217 | %{buildroot}%{python_sitearch}/*.a
|
|---|
| 218 |
|
|---|
| 219 | %files
|
|---|
| 220 | %doc COPYING doc/*
|
|---|
| 221 | # ex-hpijs
|
|---|
| 222 | %{_bindir}/hpijs.exe
|
|---|
| 223 | # ex-hpijs
|
|---|
| 224 | #%{_bindir}/hpcups-update-ppds
|
|---|
| 225 | %{_bindir}/hp-align
|
|---|
| 226 | %{_bindir}/hp-clean
|
|---|
| 227 | %{_bindir}/hp-colorcal
|
|---|
| 228 | %{_bindir}/hp-config_usb_printer
|
|---|
| 229 | %{_bindir}/hp-devicesettings
|
|---|
| 230 | %{_bindir}/hp-diagnose_plugin
|
|---|
| 231 | %{_bindir}/hp-diagnose_queues
|
|---|
| 232 | %{_bindir}/hp-fab
|
|---|
| 233 | %{_bindir}/hp-faxsetup
|
|---|
| 234 | %{_bindir}/hp-firmware
|
|---|
| 235 | %{_bindir}/hp-info
|
|---|
| 236 | %{_bindir}/hp-levels
|
|---|
| 237 | %{_bindir}/hp-linefeedcal
|
|---|
| 238 | %{_bindir}/hp-makecopies
|
|---|
| 239 | %{_bindir}/hp-makeuri
|
|---|
| 240 | %{_bindir}/hp-plugin
|
|---|
| 241 | %{_bindir}/hp-pqdiag
|
|---|
| 242 | %{_bindir}/hp-printsettings
|
|---|
| 243 | %{_bindir}/hp-probe
|
|---|
| 244 | %{_bindir}/hp-query
|
|---|
| 245 | %{_bindir}/hp-scan
|
|---|
| 246 | %{_bindir}/hp-sendfax
|
|---|
| 247 | %{_bindir}/hp-setup
|
|---|
| 248 | %{_bindir}/hp-testpage
|
|---|
| 249 | %{_bindir}/hp-timedate
|
|---|
| 250 | %{_bindir}/hp-unload
|
|---|
| 251 | %{_bindir}/hp-wificonfig
|
|---|
| 252 | %{_cups_serverbin}/backend/*.exe
|
|---|
| 253 | # ex-hpijs
|
|---|
| 254 | %{_cups_serverbin}/filter/*.exe
|
|---|
| 255 | %{_cups_serverbin}/filter/hpps
|
|---|
| 256 | %{_cups_serverbin}/filter/pstotiff
|
|---|
| 257 | # ex-hpijs
|
|---|
| 258 | %{_datadir}/cups/drv/*
|
|---|
| 259 | %if 0%{!?without_fax:1}
|
|---|
| 260 | %{_datadir}/cups/mime/pstotiff.convs
|
|---|
| 261 | %endif
|
|---|
| 262 | # Files
|
|---|
| 263 | %{_datadir}/hplip/align.py*
|
|---|
| 264 | %{_datadir}/hplip/check-plugin.py*
|
|---|
| 265 | %{_datadir}/hplip/clean.py*
|
|---|
| 266 | %{_datadir}/hplip/colorcal.py*
|
|---|
| 267 | %{_datadir}/hplip/config_usb_printer.py*
|
|---|
| 268 | %{_datadir}/hplip/devicesettings.py*
|
|---|
| 269 | %{_datadir}/hplip/diagnose_plugin.py*
|
|---|
| 270 | %{_datadir}/hplip/diagnose_queues.py*
|
|---|
| 271 | %{_datadir}/hplip/fab.py*
|
|---|
| 272 | %if 0%{!?without_fax:1}
|
|---|
| 273 | %{_datadir}/hplip/fax
|
|---|
| 274 | %endif
|
|---|
| 275 | %{_datadir}/hplip/faxsetup.py*
|
|---|
| 276 | %{_datadir}/hplip/firmware.py*
|
|---|
| 277 | %{_datadir}/hplip/hpdio.py*
|
|---|
| 278 | %{_datadir}/hplip/hplip_clean.sh
|
|---|
| 279 | %{_datadir}/hplip/hpssd*
|
|---|
| 280 | %{_datadir}/hplip/info.py*
|
|---|
| 281 | %{_datadir}/hplip/__init__.py*
|
|---|
| 282 | %{_datadir}/hplip/levels.py*
|
|---|
| 283 | %{_datadir}/hplip/linefeedcal.py*
|
|---|
| 284 | %{_datadir}/hplip/makecopies.py*
|
|---|
| 285 | %{_datadir}/hplip/makeuri.py*
|
|---|
| 286 | %{_datadir}/hplip/plugin.py*
|
|---|
| 287 | %{_datadir}/hplip/pqdiag.py*
|
|---|
| 288 | %{_datadir}/hplip/printsettings.py*
|
|---|
| 289 | %{_datadir}/hplip/probe.py*
|
|---|
| 290 | %{_datadir}/hplip/query.py*
|
|---|
| 291 | %{_datadir}/hplip/scan.py*
|
|---|
| 292 | %{_datadir}/hplip/sendfax.py*
|
|---|
| 293 | %{_datadir}/hplip/setup.py*
|
|---|
| 294 | %{_datadir}/hplip/testpage.py*
|
|---|
| 295 | %{_datadir}/hplip/timedate.py*
|
|---|
| 296 | %{_datadir}/hplip/unload.py*
|
|---|
| 297 | %{_datadir}/hplip/wificonfig.py*
|
|---|
| 298 | # Directories
|
|---|
| 299 | %{_datadir}/hplip/base
|
|---|
| 300 | %{_datadir}/hplip/copier
|
|---|
| 301 | %{_datadir}/hplip/data/ldl
|
|---|
| 302 | %{_datadir}/hplip/data/localization
|
|---|
| 303 | %{_datadir}/hplip/data/pcl
|
|---|
| 304 | %{_datadir}/hplip/data/ps
|
|---|
| 305 | %{_datadir}/hplip/installer
|
|---|
| 306 | %{_datadir}/hplip/pcard
|
|---|
| 307 | %{_datadir}/hplip/prnt
|
|---|
| 308 | %if 0%{!?without_sane:1}
|
|---|
| 309 | %{_datadir}/hplip/scan
|
|---|
| 310 | %endif
|
|---|
| 311 | %{_datadir}/ppd
|
|---|
| 312 | #%{_sharedstatedir}/hp
|
|---|
| 313 | %dir %attr(0775,root,lp) %{_localstatedir}/run/hplip
|
|---|
| 314 | #%{_tmpfilesdir}/hplip.conf
|
|---|
| 315 | %{_sysconfdir}/udev/rules.d/56-hpmud.rules
|
|---|
| 316 |
|
|---|
| 317 | %files common
|
|---|
| 318 | %license COPYING
|
|---|
| 319 | %dir %{_sysconfdir}/hp
|
|---|
| 320 | %config(noreplace) %{_sysconfdir}/hp/hplip.conf
|
|---|
| 321 | %dir %{_datadir}/hplip
|
|---|
| 322 | %dir %{_datadir}/hplip/data
|
|---|
| 323 | %{_datadir}/hplip/data/models
|
|---|
| 324 |
|
|---|
| 325 | %files libs
|
|---|
| 326 | %{_libdir}/hpip*.dll
|
|---|
| 327 | #%{_libdir}/hpdis*.dll
|
|---|
| 328 | %{_libdir}/hpmud*.dll
|
|---|
| 329 | # Python extension
|
|---|
| 330 | %{python_sitearch}/*.dll
|
|---|
| 331 |
|
|---|
| 332 | %files gui
|
|---|
| 333 | %{_bindir}/hp-check
|
|---|
| 334 | %{_bindir}/hp-print
|
|---|
| 335 | %{_bindir}/hp-systray
|
|---|
| 336 | %{_bindir}/hp-toolbox
|
|---|
| 337 | #%{_datadir}/applications/*.desktop
|
|---|
| 338 | # Files
|
|---|
| 339 | %{_datadir}/hplip/check.py*
|
|---|
| 340 | %{_datadir}/hplip/print.py*
|
|---|
| 341 | %{_datadir}/hplip/systray.py*
|
|---|
| 342 | %{_datadir}/hplip/toolbox.py*
|
|---|
| 343 | # Directories
|
|---|
| 344 | %{_datadir}/hplip/data/images
|
|---|
| 345 | %{_datadir}/hplip/ui4
|
|---|
| 346 |
|
|---|
| 347 | %if 0%{!?without_sane:1}
|
|---|
| 348 | %files -n libsane-hpaio
|
|---|
| 349 | %{_libdir}/sane/sane-*.dll
|
|---|
| 350 | %endif
|
|---|
| 351 |
|
|---|
| 352 | %post
|
|---|
| 353 | #%{_bindir}/hpcups-update-ppds &>/dev/null ||:
|
|---|
| 354 |
|
|---|
| 355 | #%post libs -p /sbin/ldconfig
|
|---|
| 356 |
|
|---|
| 357 | #%postun libs -p /sbin/ldconfig
|
|---|
| 358 |
|
|---|
| 359 | %changelog
|
|---|
| 360 | * Mon Jun 13 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 3.16.3-1
|
|---|
| 361 | - initial port
|
|---|