forked from pycontribs/pyrax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 886 Bytes
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
PACKAGE := $(shell basename *.spec .spec)
ARCH = noarch
RPMBUILD = rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %(pwd)/rpms" \
--define "_srcrpmdir %{_rpmdir}" \
--define "_sourcedir %{_topdir}"
PYTHON = $(which python)
all: rpms
clean:
rm -rf dist/ build/ rpm-build/ rpms/
rm -rf docs/*.gz MANIFEST *~
find . -name '*.pyc' -exec rm -f {} \;
build: clean
python setup.py build -f
install: build
python setup.py install -f
reinstall: uninstall install
uninstall: clean
rm -f /usr/bin/${PACKAGE}
rm -rf /usr/lib/python2.*/site-packages/${PACKAGE}
uninstall_rpms: clean
rpm -e ${PACKAGE}
sdist:
python setup.py sdist
prep_rpmbuild: build sdist
mkdir -p rpm-build
mkdir -p rpms
cp dist/*.gz rpm-build/
rpms: prep_rpmbuild
${RPMBUILD} -ba ${PACKAGE}.spec
srpm: prep_rpmbuild
${RPMBUILD} -bs ${PACKAGE}.spec