<?xml version="1.0"?>
<package name="hplip">
	<description>HP Linux Imaging and Printing Project</description>
	<releases>
		<release version="3.25.8" revision="1">
			<deps>
				<dep name="cups"/>
				<dep name="dbus-python"/>
				<dep name="ghostscript"/>
				<dep name="jpeg"/>
				<dep name="libusb-1.0"/>
				<dep name="net-snmp"/>
				<dep name="openssl"/>
				<dep name="perl"/>
				<dep name="pillow"/>
				<dep name="Python3"/>
				<dep name="sane-backends"/>
				<dep name="systemd"/>
			</deps>
			<build>
				<script>
					<archive name="hplip-$VERSION">
						<!-- fix build with GCC 15, from Fedora -->
						<patch name="hplip-$VERSION-gcc15-1"/>

						<!-- disable broken pcardext to fix build -->
						<cmd>sed -i -e 's/$(pcardext_LTLIBRARIES) //' -e '/ install/s/install-pcardextLTLIBRARIES //' Makefile.in</cmd>

						<!-- install udev rules into /usr/lib/udev/rules.d -->
						<cmd>sed -i -e 's:/etc/udev/rules.d:/usr/lib/udev/rules.d:g' Makefile.in</cmd>

						<!-- SANE conf files are in /usr/lib/sane.d -->
						<cmd>sed -i -e 's:/etc/sane.d:/usr/lib/sane.d:g' Makefile.in</cmd>

						<cmd>PYTHON=python3 ./configure --with-hpppddir=/usr/share/ppd/hplip --disable-gui-build --disable-imageProcessor-build</cmd>
						<cmd>make</cmd>
						<cmd>make install -j 1</cmd>

						<!-- we've disabled the gui -->
						<cmd>rm -vf /usr/share/applications/hplip.desktop</cmd>
						<!-- documentation is not really helpful for this package -->
						<cmd>rm -rvf /usr/share/doc/hplip-$VERSION</cmd>
						<!-- remove hp-systray from autostart -->
						<cmd>rm -vf /etc/xdg/autostart/hplip-systray.desktop</cmd>
					</archive>
				</script>
			</build>
		</release>
	</releases>
</package>
