File: rules

package info (click to toggle)
inchi 1.03%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 12,924 kB
  • sloc: ansic: 102,159; cpp: 7,685; python: 672; makefile: 312; sh: 1
file content (33 lines) | stat: -rwxr-xr-x 1,042 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
#!/usr/bin/make -f
# -*- makefile -*-

SOMAJOR = $(shell grep ^MAIN_VERSION INCHI_API/gcc_so_makefile/makefile | cut -d . -f 2)
SOMINOR = $(shell grep ^VERSION INCHI_API/gcc_so_makefile/makefile | cut -d . -f 2-)

SOVERSION = $(SOMAJOR).$(SOMINOR)

%:
	dh $@ --buildsystem=makefile

override_dh_auto_build:
	dh_auto_build -- -C $(CURDIR)/INCHI_API/gcc_so_makefile/ ISLINUX=1

override_dh_install:
	dh_install
	find INCHI_API/gcc_so_makefile/result -name 'libinchi.so.*' \
		| grep -v '.gz$$' \
		| xargs -i dh_install -plibinchi$(SOMAJOR) {} usr/lib/$(DEB_HOST_MULTIARCH)
	mkdir --parents $(CURDIR)/debian/libinchi-dev/usr/lib/$(DEB_HOST_MULTIARCH)
	ln -s libinchi.so.$(SOVERSION) \
		$(CURDIR)/debian/libinchi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libinchi.so

override_dh_installman: debian/inchi_main.1
	dh_installman

override_dh_auto_clean:
	find $(CURDIR) -name "*.o" -delete
	$(RM) INCHI_API/gcc_so_makefile/result/*.so. \
	      INCHI_API/gcc_so_makefile/result/inchi_main

debian/inchi_main.1: debian/inchi_main.1.txt
	a2x -f manpage $<