Skip to content

Commit 6791ab0

Browse files
author
Sam Clements
committed
Cleaned up Makefile
1 parent 025ae38 commit 6791ab0

1 file changed

Lines changed: 8 additions & 23 deletions

File tree

Makefile

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
specfile=python-riemann-client.spec
2-
3-
name=python-riemann-client
41
version=$(shell python setup.py --version)
5-
release=$(shell grep Release ${specfile} | awk '{ print $$2 }')
6-
7-
package_name=${name}-${version}-${release}.noarch.rpm
8-
package=dist/${package_name}
9-
tarball=${HOME}/rpmbuild/SOURCES/${name}-${version}.tar.gz
10-
11-
${package}: ${specfile} ${tarball}
12-
rpmbuild -ba ${specfile}
13-
mkdir -p dist
14-
cp ${HOME}/rpmbuild/RPMS/noarch/${package_name} dist/${package_name}
15-
16-
${specfile}:
2+
release=$(shell grep Release python-riemann-client.spec | awk '{ print $$2 }')
173

18-
${tarball}:
19-
tar -zcf ${tarball} . --exclude-vcs --transform='s/./${name}-${version}/'
4+
package=python-riemann-client-${version}-${release}.noarch.rpm
5+
tarball=${HOME}/rpmbuild/SOURCES/python-riemann-client-${version}.tar.gz
206

21-
test: ${package}
22-
rpm -qpl ${package} | grep /usr/bin/riemann-client
23-
rpm -qpl ${package} | grep riemann_client/client.py
24-
rpm -qpl ${package} | grep README.rst
7+
dist/${package}: python-riemann-client.spec ${tarball}
8+
rpmbuild -ba python-riemann-client.spec
9+
rsync -a ${HOME}/rpmbuild/RPMS/noarch/${package} dist/${package}
2510

26-
.PHONY: rpm test test_%
27-
.SILENT: test test_%
11+
${tarball}: $(shell find riemann_client)
12+
tar -zcf ${tarball} . --exclude-vcs --transform='s/./python-riemann-client-${version}/'

0 commit comments

Comments
 (0)