-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile.am
34 lines (24 loc) · 1.34 KB
/
Makefile.am
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
SUBDIRS = @LIBPYCSA_SUBDIR@
PACKAGE_NAME = python-csa
PACKAGE_VERSION = $(shell PYTHONPATH="@srcdir@/csa" python -c 'from version import __version__; print __version__')
EXTRA_DIST = $(srcdir)/setup.py csa/*.py $(srcdir)/csa/*.py
debdir = dist/csa-$(PACKAGE_VERSION)
.PHONY: dist debian-source debian-package
README: $(srcdir)/README.md
ln -s $(srcdir)/README.md README
dist/csa-$(PACKAGE_VERSION).tar.gz:
$(PYTHON) setup.py sdist
debian-source: dist/csa-$(PACKAGE_VERSION).tar.gz
@test ! -e $(debdir) || ( echo "*** Remove directory dist/csa-${PACKAGE_VERSION}" && exit 1 )
cp -p dist/csa-$(PACKAGE_VERSION).tar.gz dist/$(PACKAGE_NAME)_$(PACKAGE_VERSION).orig.tar.gz
( cd dist; tar zxf $(PACKAGE_NAME)_$(PACKAGE_VERSION).orig.tar.gz )
mkdir $(debdir)/debian
cp -pr debian $(debdir)
debian-package: debian-source
( cd $(debdir) && dpkg-buildpackage '-mMikael Djurfeldt <[email protected]>' -rfakeroot && cd ../.. && rm -rf $(debdir) )
install-exec-hook:
cd $(srcdir) &&\
( test "$(srcdir)" != "$(builddir)" && cp "$(builddir)/csa/__init__.py" "$(srcdir)/csa"; true ) &&\
$(PYTHON) setup.py build --build-base=$(abs_builddir)/build install --prefix=$(DESTDIR)$(prefix) --install-lib=$(DESTDIR)$(pyexecdir) --install-scripts=$(DESTDIR)$(bindir) --install-data=$(DESTDIR)$(pkgdatadir)
clean-local:
-rm -rf $(srcdir)/csa/*.pyc $(abs_builddir)/build tex.cache