File: rules

package info (click to toggle)
opencc 1.1.6%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,272 kB
  • sloc: cpp: 5,862; python: 352; javascript: 133; makefile: 106; sh: 55
file content (55 lines) | stat: -rwxr-xr-x 1,433 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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto

include /usr/share/dpkg/architecture.mk

# Disable parallel build to circumvent some random build error
# (needs further investigation)
%:
	dh $@ --buildsystem=cmake --with pkgkde_symbolshelper --no-parallel

BUILD_OPTIONS = \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
    -DCMAKE_BUILD_TYPE=Release \
    -DUSE_SYSTEM_DARTS=ON \
    -DUSE_SYSTEM_GTEST=ON \
    -DUSE_SYSTEM_MARISA=ON \
    -DUSE_SYSTEM_PYBIND11=ON \
    -DUSE_SYSTEM_RAPIDJSON=ON \
    -DUSE_SYSTEM_TCLAP=ON

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
BUILD_OPTIONS += -DBUILD_DOCUMENTATION=ON
else
BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF
endif

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
BUILD_OPTIONS += -DENABLE_GTEST=ON
else
BUILD_OPTIONS += -DENABLE_GTEST=OFF
endif

override_dh_auto_configure:
	dh_auto_configure -- $(BUILD_OPTIONS)

execute_after_dh_auto_clean:
	find . -name *.pyc -delete

execute_after_dh_installdocs-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	dh_doxygen --indep
endif

override_dh_installdocs:
	dh_installdocs -plibopencc-doc --doc-main-package=opencc
	dh_installdocs --remaining-packages

override_dh_installchangelogs:
	dh_installchangelogs -k NEWS.md