Skip to content

Commit de0f0bf

Browse files
committed
Switched build to FPM.
1 parent bbcdc6f commit de0f0bf

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

Makefile

+13-16
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,25 @@ uninstall-lib:
3737
rm -f \
3838
$(DESTDIR)$(pydir)/cloudformation.py \
3939
$(DESTDIR)$(pydir)/cloudformation.pyc
40+
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(pydir)
4041

4142
uninstall-man:
4243
rm -f $(DESTDIR)$(mandir)/man7/python-cloudformation.7
4344
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(mandir)/man7
4445

45-
build:
46-
sudo make deb
47-
make pypi
48-
49-
deb:
50-
[ "$$(whoami)" = "root" ] || false
51-
m4 \
52-
-D__PYTHON__=python$(PYTHON_VERSION) \
53-
-D__VERSION__=$(VERSION)-$(BUILD)py$(PYTHON_VERSION) \
54-
control.m4 >control
55-
debra create debian control
56-
make install prefix=/usr DESTDIR=debian
57-
chown -R root:root debian
58-
debra build debian python-cloudformation_$(VERSION)-$(BUILD)py$(PYTHON_VERSION)_all.deb
59-
debra destroy debian
46+
build: build-deb build-pypi
6047

61-
pypi:
48+
build-deb:
49+
make install prefix=/usr DESTDIR=debian
50+
fpm -s dir -t deb -C debian \
51+
-n python-cloudformation -v $(VERSION)-$(BUILD)py$(PYTHON_VERSION) -a all \
52+
-d python$(PYTHON_VERSION) \
53+
-m "Richard Crowley <richard@devstructure.com>" \
54+
--url "https://github.com/devstructure/python-cloudformation" \
55+
--description "Tools for creating CloudFormation templates."
56+
make uninstall prefix=/usr DESTDIR=debian
57+
58+
build-pypi:
6259
m4 -D__VERSION__=$(VERSION) setup.py.m4 >setup.py
6360
$(PYTHON) setup.py bdist_egg
6461

control.m4

-8
This file was deleted.

0 commit comments

Comments
 (0)