File: rules

package info (click to toggle)
teakra 0.0~git20250117.4dfebf8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,708 kB
  • sloc: cpp: 27,688; makefile: 107; ansic: 90; python: 59; sh: 13
file content (22 lines) | stat: -rwxr-xr-x 794 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+all qa=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_SHARED_LIBS=true

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_install:
	mkdir -p debian/tmp/src
	printf '%s\n' '<meta name="color-scheme" content="light dark">'                           >  debian/tmp/README.html
	cmark README.md | sed -E -e '/img src="http/d' -e 's/href="([^"]+)\.md"/href="\1.html"/g' >> debian/tmp/README.html
	for file in src/*.md; \
	do \
		name=$$(basename "$$file" .md); \
		printf '%s\n' '<meta name="color-scheme" content="light dark">' >  "debian/tmp/src/$$name.html"; \
		cmark "$$file" | sed -E 's/href="([^"]+)\.md"/href="\1.html"/g' >> "debian/tmp/src/$$name.html"; \
	done
endif