#!/usr/bin/make -f
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-API ?= $(shell debian/getapi.sh)
-LIB = $(CURDIR)/debian/install/usr/lib/$(DEB_HOST_MULTIARCH)
-
include debian/confflags
+API = $(shell debian/getapi.sh)
+LIB = $(CURDIR)/debian/install/usr/lib/$(DEB_HOST_MULTIARCH)
+
builddir = compiling
-x265-clean = rm -rf $(builddir) && mkdir $(builddir)
+x265-clean = rm -rf $(builddir) && mkdir -p $(builddir)
x265-install = $(MAKE) -C $(builddir) install DESTDIR=$(CURDIR)/debian/install
x265-build = dh_auto_build -D$(builddir)
test-build = \
override_dh_auto_clean:
dh_auto_clean
- rm -rf $(builddir) doc/reST/build debian/install debian/test.y4m
+ dh_auto_clean -Ddoc/reST || true
+ rm -rf $(builddir) debian/install debian/libx265-$(API).* \
+ debian/test.y4m x265_2pass.log* test.hevc
override_dh_auto_build:
sed -e 's/@API@/$(API)/g' debian/control.in > debian/control
cp -f debian/libx265N.install debian/libx265-$(API).install
unxz -fk debian/test.y4m.xz
# build x265 8-bit
- mkdir $(builddir)
+ mkdir -p $(builddir)
cd $(builddir) && cmake $(8bit_confflags) ../source
$(x265-build)
$(x265-install)
# build x265 10-bit static
$(x265-clean)
rm -f $(LIB)/x265-10bit/libx265.a
- cd $(builddir) && cmake $(10bit_static_confflags) ../source
+ cd $(builddir) && cmake $(10bit_static_confflags) -DENABLE_TESTS=ON ../source
$(x265-build)
install -c -D -m644 $(builddir)/libx265.a $(LIB)/x265-10bit
# build documentation
- $(MAKE) -C doc/reST pickle html
+ $(MAKE) -C doc/reST pickle html man
+
+ifneq (arm, $(shell dpkg-architecture -qDEB_HOST_GNU_CPU))
+override_dh_auto_test:
+ $(builddir)/test/TestBench
+endif
override_dh_install:
dh_install --list-missing --sourcedir=$(CURDIR)/debian/install