summaryrefslogtreecommitdiffstats
path: root/system-config-printer/Pkgfile
blob: e0ae76b9a495f14d26f168312e510320db4c7ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Description: Configuration de cups via Python
# URL: http://cyberelk.net/tim/software/system-config-printer/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: pycups, pyxml, dbus-python, xmlto, intltool, p5-pycurl, python-notify
# Run on: pycups,pyxml,dbus-python,xmlto,p5-pycurl,python-notify

name=system-config-printer
version=1.3.9
python_version=2.7
release=1

source=(http://cyberelk.net/tim/data/$name/1.3/$name-$version.tar.xz)

build() {
	cd $name-$version
	export PYTHON=/usr/bin/python2
	
	sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
		-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
		$(find . -name '*.py')
	sed -i "s|#!/usr/bin/python|#!/usr/bin/python2|" udev/udev-add-printer 

	./configure --prefix=/usr \
		--sbindir=/usr/bin \
		--sysconfdir=/etc \
		--with-udev-rules
	make
	make DESTDIR=$PKG install
}