1PACKAGE=LPRng
2VERSION=3.8.22
3RELEASE=1
4RPM=/usr/src/redhat/RPMS/i386/${PACKAGE}-${VERSION}-${RELEASE}.i386.rpm
5CONFIGURE_ARGS=--prefix=/usr --sysconfdir=/etc --with-filterdir=/usr/libexec/filters --with-ld_library_path=/lib:/usr/lib:/usr/local/lib --with-filter_path=/bin:/usr/bin:/usr/libexec:/usr/local/libexec:/usr/sbin:/var/spool/bin
6
7COPY_HERE=
8.PHONY: all rpm testi testu dou doU undo update clean checkit
9
10all:
11	make update
12	chown root.bin *
13	make rpm
14
15rpm:	${RPM}
16
17testi:
18	rpm -i --test ${RPM}
19testu:
20	rpm -U --test ${RPM} || echo $$?
21dou:
22	rpm -U  ${RPM} || echo ERROR $$?
23doU:
24	rpm -U --force ${RPM} || echo ERROR $$?
25undo:
26	rpm -e --nodeps ${PACKAGE}
27
28${RPM}: ${PACKAGE}.spec
29	cp lpd.init /usr/src/redhat/SOURCES/lpd.init
30	rpmbuild -ba ${PACKAGE}.spec
31
32clean:
33	rm -f *.tgz
34	rm -rf /usr/src/redhat/BUILD/${PACKAGE}-*
35
36update:
37	perl -spi -e "\
38		s|^Version: .*|Version: ${VERSION}|; \
39		s|^Release: .*|Release: ${RELEASE}|; \
40		" ${PACKAGE}.spec;
41
42checkit: update
43	chown root.bin *
44	make rpm
45