File: rules

package info (click to toggle)
v4l2loopback 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 344 kB
  • ctags: 298
  • sloc: ansic: 2,926; sh: 277; makefile: 117
file content (64 lines) | stat: -rwxr-xr-x 2,516 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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
# Copyright © 2010-2014 IOhannes m zmölnig <umlaeute@debian.org>
# Description: Main Debian packaging script for v4l2loopback-sorce
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk

BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)

install/v4l2loopback-source::

	# install source code and create directory
	install -D -m 0755  Makefile \
		debian/tmp/modules/v4l2loopback/Makefile
	install -m 0644  v4l2loopback.c v4l2loopback_formats.h \
		debian/tmp/modules/v4l2loopback/
	install -m 0644  README.md NEWS AUTHORS ChangeLog \
		debian/tmp/modules/v4l2loopback/

	# Enforce executable bit on debian/rules, and create directory
	# structure for modules source
	install -D -m 0755 debian/rules.modules \
		debian/tmp/modules/v4l2loopback/debian/rules
	# Prepare the other debian stuff
	for f in *.modules.in control compat copyright changelog docs README.Debian; do \
		install -m 0644 debian/$$f \
			debian/tmp/modules/v4l2loopback/debian/; \
	done
	# Prepare the debian source tarball
	tar --sort=name -jcf debian/v4l2loopback-source/usr/src/v4l2loopback.tar.bz2 \
		-C debian/tmp --mtime="$(BUILD_DATE)" modules

install/v4l2loopback-dkms::
	# Create the v4l2loopback-dkms package.
	dh_install -p$(cdbs_curpkg) Makefile usr/src/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
	dh_install -p$(cdbs_curpkg) *.[chS]  usr/src/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
	dh_dkms -p$(cdbs_curpkg)

## building manpages
CDBS_BUILD_DEPENDS += , help2man (>= 1.37.1~)
manpages=man/v4l2loopback-ctl.1
build/v4l2loopback-utils:: $(manpages)
clean:: clean-manpages

.PHONY: clean-manpages
clean-manpages:
	rm -f $(manpages)
man/v4l2loopback-ctl.1: utils/v4l2loopback-ctl
	help2man -N --name "control v4l2 loopback devices" $^ > $@