| 1 |
#!/usr/bin/make -f |
| 2 |
# See debhelper(7) (uncomment to enable) |
| 3 |
# output every command that modifies files on the build system. |
| 4 |
#export DH_VERBOSE = 1 |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 8 |
include /usr/share/dpkg/buildflags.mk |
| 9 |
include /usr/share/dpkg/architecture.mk |
| 10 |
|
| 11 |
ifneq (,$(filter $(DEB_BUILD_ARCH),armel)) |
| 12 |
export DEB_LDFLAGS_MAINT_APPEND = -latomic |
| 13 |
endif |
| 14 |
|
| 15 |
# see ENVIRONMENT in dpkg-buildflags(1) |
| 16 |
# package maintainers to append CFLAGS |
| 17 |
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic |
| 18 |
# package maintainers to append LDFLAGS |
| 19 |
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed |
| 20 |
|
| 21 |
%: |
| 22 |
dh $@ --buildsystem=cmake |
| 23 |
|
| 24 |
override_dh_auto_configure: fasttext.1 |
| 25 |
dh_auto_configure --buildsystem=cmake |
| 26 |
dh_auto_configure --buildsystem=pybuild |
| 27 |
|
| 28 |
override_dh_auto_build: |
| 29 |
dh_auto_build --buildsystem=cmake |
| 30 |
dh_auto_build --buildsystem=pybuild |
| 31 |
|
| 32 |
override_dh_auto_install: |
| 33 |
dh_auto_install --buildsystem=cmake |
| 34 |
dh_auto_install --buildsystem=pybuild |
| 35 |
find $(CURDIR)/debian/tmp -name '*.a' -print0 | xargs -0 rm -f {}\; |
| 36 |
|
| 37 |
override_dh_auto_clean: |
| 38 |
dh_auto_clean --buildsystem=cmake |
| 39 |
-rm -rf fasttext.1 |
| 40 |
-rm -rf .pybuild |
| 41 |
-rm -rf python/fasttext_module/fasttext.egg-info |
| 42 |
-rm -rf build |
| 43 |
-rm -rf tmp |
| 44 |
|
| 45 |
DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl |
| 46 |
XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" |
| 47 |
|
| 48 |
fasttext.1: debian/fasttext.xml |
| 49 |
$(XP) $(DB2MAN) $< |