File: rules

package info (click to toggle)
piespy 0.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 340 kB
  • sloc: java: 999; xml: 81; makefile: 19; sh: 17
file content (30 lines) | stat: -rwxr-xr-x 1,085 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
#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_build:

	# Upstream distributes pircbot as a JAR of both binaries and source, here we rebuild it for DFSG compliance
	mkdir -p target/pircbot-sources target/pircbot-classes
	cd target/pircbot-sources && jar -xf ../../lib/pircbot.jar && find . -name '*.class' -exec rm {} ';'
	javac -source 7 -target 7 -d target/pircbot-classes `find . -name '*.java'`
	jar -cf target/pircbot.jar -C target/pircbot-classes .

	# Compile PieSpy
	mkdir -p target/classes
	javac -source 7 -target 7 -classpath target/pircbot.jar -d target/classes `find org -name '*.java'`
	jar -cf target/piespy.jar -C target/classes .

	# Generate the manpages
	cd debian/; \
		xsltproc --nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl piespy.man.xml

override_dh_auto_clean:
	rm -rf target debian/piespy.1

override_dh_auto_install:
	dh_install target/pircbot.jar  usr/share/piespy/
	dh_install target/piespy.jar   usr/share/piespy/
	install debian/piespy.sh       $(CURDIR)/debian/piespy/usr/bin/piespy
	dh_installexamples $(CURDIR)/config.ini