File: rules

package info (click to toggle)
x264 2:0.155.2917+git0a84d98-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,732 kB
  • sloc: ansic: 67,842; asm: 37,367; sh: 4,416; lisp: 1,795; python: 1,046; perl: 905; makefile: 385
file content (66 lines) | stat: -rwxr-xr-x 2,065 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f

libx264N := libx264-$(shell awk '/\#define X264_BUILD/{print $$3}' x264.h)

include /usr/share/dpkg/architecture.mk
include debian/confflags

DH_INSTALL_FILES = debian/$(libx264N).install \
                   debian/libx264-dev.install

%:
	dh $@

.PHONY: debian/control
debian/control:
	sed -e 's/@libx264N@/$(libx264N)/g' $@.in > $@

$(DH_INSTALL_FILES):
	sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $(subst $(libx264N),libx264N,$@).in > $@

override_dh_auto_build:
	# Build static lib
	CFLAGS="$(extra_cflags)" LDFLAGS="$(LDFLAGS)" ./configure $(static_confflags) \
	   || ( tail -v -n +0 config.log config.log ; exit 1 )
	$(MAKE)
	$(MAKE) install DESTDIR=$(CURDIR)/debian/install/static
	$(MAKE) distclean
	# Build shared lib
	CFLAGS="$(extra_cflags)" LDFLAGS="$(LDFLAGS)" ./configure $(shared_confflags) \
	   || ( tail -v -n +0 config.log config.log ; exit 1 )
	$(MAKE)
	$(MAKE) install DESTDIR=$(CURDIR)/debian/install/shared
ifeq ($(do_opt),yes)
	$(MAKE) distclean
	# Build opt lib
	LDFLAGS="$(LDFLAGS)" ./configure $(opt_confflags) \
	   || ( tail -v -n +0 config.log config.log ; exit 1 )
	$(MAKE)
	$(MAKE) install DESTDIR=$(CURDIR)/debian/install/opt
endif

override_dh_auto_configure:
	# dh_auto_configure phase handled via dh_auto_build.

override_dh_auto_install:
	# dh_auto_install phase handled via dh_auto_build.

override_dh_auto_clean: debian/control
	rm -rf debian/install
	$(MAKE) -o config.mak distclean
	dh_clean config.mak2 $(DH_INSTALL_FILES)

override_dh_install: $(DH_INSTALL_FILES)
	dh_install --sourcedir=debian/install
ifeq ($(do_opt),yes)
	mkdir -p debian/$(libx264N)$(opt_libdir)
	cp -a debian/install/opt$(opt_libdir)/*.so.* debian/$(libx264N)$(opt_libdir)
endif

override_dh_missing:
	dh_missing --list-missing --sourcedir=debian/install

debian/x264.1: build
	env LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(CURDIR)/debian/install/shared/usr/lib/$(DEB_HOST_MULTIARCH)" \
	help2man -n "fast h264 encoder" -N -s1 -S "Videolan project" -h '--fullhelp' \
		debian/install/shared/usr/bin/x264 > debian/x264.1