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 56 57 58 59 60 61 62 63
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
#Below list is taken from README
DRIVERS= --enable-avalon\
--enable-avalon2\
--enable-avalon4\
--enable-bflsc\
--enable-bitfury\
--enable-cointerra\
--enable-drillbit\
--enable-hashfast\
--enable-hashratio\
--enable-icarus\
--enable-klondike
%:
dh $@ --with autoreconf
override_dh_auto_configure:
dh_auto_configure -- --bindir=/usr/lib/cgminer $(DRIVERS) --with-system-libusb --disable-silent-rules --enable-libsystemd --with-system-jansson
override_dh_auto_build:
dh_auto_build
$(CC) api-example.c $(shell dpkg-buildflags --get CFLAGS) \
$(shell dpkg-buildflags --get LDFLAGS) \
$(shell dpkg-buildflags --get CPPFLAGS) \
-I /usr/include/libusb-1.0/ -o cgminer-api
#generates manpage, make sure package is installed first
MAN_NAME=multi-threaded multi-pool GPU, FPGA and CPU bitcoin miner.
debian/cgminer.1: /usr/bin/cgminer
help2man --no-discard-stderr --no-info --name="$(MAN_NAME)" $? #for debugging bug #757381
help2man --no-discard-stderr --no-info --name="$(MAN_NAME)" $? > $@
perl \
-E 's{\s+(It was generated by help2man)}{ $$1}; # correcting help2man comment' \
-E 's{^cgminer\s+[\d.]+$$}{$(MAN_NAME)}; # correcting DESCRIPTION section' \
-E 's{\.PP\K}{\n.SH OPTIONS\n}; # create OPTIONS section' \
-E 's{^(Options\s+for)}{.SS\n$$1}; # separate Options paragraphs' \
-E 's{^(\\fB\\-\\-)}{.TP\n$$1}; # prepend each option with .TP' \
-E 's{(?:<arg>\s+|\s\s+|\\fR\s+(?!<arg>))\K}{\n}; # separate arguments and their descriptions' \
-pi $@
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_builddeb:
dh_builddeb -- -Zxz
copyright_check:
$(MAKE) -f /usr/share/cdbs/1/rules/utils.mk debian/stamp-copyright-check
rm debian/stamp-copyright-check
DPATH := $(abspath $(dir $(MAKEFILE_LIST)))
VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.]+)}')
.PHONY: get-orig-source
get-orig-source:
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(DPATH)
|