~ubuntu-branches/ubuntu/quantal/pmidi/quantal

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
AUTOMAKE_OPTIONS	= 1.4

EXTRA_DIST		=	\
	COPYING			\
	ChangeLog		\
	README			\
	@PACKAGE@.spec

SUBDIRS			=	\
	man			\
	src

#
# Rule to build RPM distribution package
#
# Later versions of rpm (eg redhat8) do not have the -ba option, and
# you have to use rpmbuild instead.
# I try them both; if someone has a better way of doing this, please
# let me know.
#
rpm: dist $(PACKAGE)-$(VERSION).tar.gz
	rm -rf build
	(mkdir build; cd build; mkdir SOURCES BUILD SPECS RPMS SRPMS)
	cp -av $(PACKAGE)-$(VERSION).tar.gz build/SOURCES
	rpmbuild --define "_topdir `pwd`/build" -ba @PACKAGE@.spec
	find build -name '*.rpm' | xargs -i cp '{}' . 
	rm -r build