File debian.rules of Package winexe

#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=-all
export DEB_CFLAGS_MAINT_APPEND=-Wall
export DEB_CFLAGS_MAINT_APPEND=-D__STDC_WANT_LIB_EXT1__=1

SAMBA_LIBDIR=$(shell pkg-config --variable libdir samba-util)/samba
SAMBA_INCDIR=$(shell pkg-config --variable includedir samba-util)

%:
	dh $@

override_dh_auto_clean:
	cd source && ./waf distclean
	rm -rf samba_* samba-* samba

override_dh_auto_configure:
	# instead of apt-get source samba, get the included source:
	cp -pr /usr/src/packages/SOURCES/src-samba/* .
	dpkg-source -x samba*.dsc
	ln -sf samba-* samba
	# Next line is temporary work-around for http://bugs.debian.org/954582
	cd samba && sed -e '/HAVE_STROPTS_H/,+2 d' -i lib/replace/system/network.h
	cd samba && ./buildtools/bin/waf -j 1 configure
	cd samba && ./buildtools/bin/waf build
	cd source && ./waf -j 1 configure --prefix=/usr --samba-lib-dirs=$(SAMBA_LIBDIR) --samba-inc-dirs="$(SAMBA_INCDIR):$(CURDIR)/samba/source4:$(CURDIR)/samba:$(CURDIR)/samba/bin/default/source4:$(CURDIR)/samba/bin/default:$(CURDIR)/samba/lib/replace:$(CURDIR)/samba/lib:$(CURDIR)/samba/bin/default/include"

override_dh_auto_build:
	cd source && ./waf build --verbose

override_dh_auto_install:
	cd source && ./waf install --destdir $(CURDIR)/debian/winexe
	# bin2c is only useful at build time, and should not be installed
	# because it conflicts with nvidia-cuda-toolkit's one
	rm -f $(CURDIR)/debian/winexe/usr/bin/bin2c
openSUSE Build Service is sponsored by