-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile.am
More file actions
45 lines (35 loc) · 1.76 KB
/
Makefile.am
File metadata and controls
45 lines (35 loc) · 1.76 KB
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
45
SUBDIRS = @LIBPYCSA_SUBDIR@
PACKAGE_NAME = python-csa
PACKAGE_VERSION = $(shell PYTHONPATH="@srcdir@/csa" python3 -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
# Catch the DEBEMAIL/FULLNAME problem early
# (debian-source is a dependency of debian-package)
@if [ -z "$$DEBEMAIL" -o -z "$$DEBFULLNAME" ]; then \
echo "*** Please define DEBEMAIL and DEBFULLNAME"; \
exit 1; \
fi
@test ! -e $(debdir) || ( echo "*** Please 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)
# dpkg-buildpackage relies on the environment variables DEBEMAIL and DEBFULLNAME
debian-package: debian-source
@if [ -z "$$DEBEMAIL" -o -z "$$DEBFULLNAME" ]; then \
echo "*** Please define DEBEMAIL and DEBFULLNAME"; \
exit 1; \
fi
( cd $(debdir) && dpkg-buildpackage -rfakeroot --changes-option=-S -sa && 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