File: rules

package info (click to toggle)
omnidb 3.0.3b+ds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: javascript: 439,909; python: 35,767; sh: 1,175; sql: 842; makefile: 28
file content (32 lines) | stat: -rwxr-xr-x 1,193 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export PYTHON=python3
export PYBUILD_NAME=omnidb
export PYBUILD_DISABLE_python2=1

override_dh_install-indep:
	dh_install -i
	echo "fonts:Depends=" >> debian/omnidb-common.substvars
	find debian/omnidb-*/ -name '*.eot' -or -name '*.svg' -or -name '*.ttf' -or -name '*.woff*' | LC_ALL=C sort | \
		while read path; do \
			file="$${path##*/}" ; \
			dpkg -S "*/$$file" | grep '^fonts' | LC_ALL=C sort | head -1 | while read pkg pkgpath; do \
				rm $$path; \
				ln -vs $$pkgpath $$path; \
				sed -i -e "/fonts:Depends/ s/$$/$${pkg%:},/" debian/omnidb-common.substvars; \
			done \
		done
	echo "js:Depends=" >> debian/omnidb-common.substvars
	find debian/omnidb-*/ -regextype egrep -regex '.*/(jq).*\.(css|js)$$' | LC_ALL=C sort | \
		while read path; do \
			file="$$(echo $${path##*/} | sed -e 's/-[0-9.]*\././')" ; \
			dpkg -S "*/$$file" | grep '^libjs' | LC_ALL=C sort | head -1 | while read pkg pkgpath; do \
				rm $$path; \
				ln -vs $$pkgpath $$path; \
				sed -i -e "/js:Depends/ s/$$/$${pkg%:},/" debian/omnidb-common.substvars; \
			done \
		done
	find debian/omnidb-common/usr/lib \( -name .directory -or -name Thumbs.db \) -delete

%:
	dh $@ --with python3