From: Victor Wagner Date: Mon, 28 Jul 2008 07:50:56 +0000 (+0000) Subject: Added makefile to build Debian package X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fbtcli.git;a=commitdiff_plain;h=58d176659e21b25079ed21bae2ea8e9b5c325b44 Added makefile to build Debian package --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8f264eb --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +BTPASS_VERSION=1.2 +BTPASS_PKG_VERSION=1 +ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +export BTPASS_VERSION + +PKG=btpasskey_$(BTPASS_VERSION)-$(BTPASS_PKG_VERSION)_$(ARCH).deb +ORIG=btpasskey_$(BTPASS_VERSION).orig.tar.gz +BUILDDIR=btpasskey-$(BTPASS_VERSION) +btpasskey: $(PKG) + +$(PKG): $(ORIG) $(BUILDDIR)/debian/rules + cd $(BUILDDIR); debuild + +$(BUILDDIR)/debian/rules: $(BUILDDIR)/btpasskey.c + -mkdir $(BUILDDIR)/debian + -cp -p packaging/btpasskey-debian/* $(BUILDDIR)/debian + sed 's!prefix=/usr/local!prefix=/usr!' btpasskey/Makefile > $(BUILDDIR)/Makefile +$(BUILDDIR)/btpasskey.c: btpasskey/btpasskey.c btpasskey/btpasskey.1 btpasskey/Makefile + -mkdir $(BUILDDIR) + cp -p $+ $(BUILDDIR) + +$(ORIG): $(BUILDDIR)/btpasskey.c + tar czf $@ $(BUILDDIR) + +clean: + rm -rf $(BUILDDIR) btpasskey_$(BTPASS_VERSION)* + diff --git a/btpasskey/Makefile b/btpasskey/Makefile index 21380db..1e65a6b 100644 --- a/btpasskey/Makefile +++ b/btpasskey/Makefile @@ -1,8 +1,12 @@ # this Makefile is for building btcli it depends on pkg-config libdbus-1-dev (and build-essential) packages +BTPASS_VERSION?=1.2 +prefix=/usr/local btpasskey: btpasskey.c - $(CC) `pkg-config --libs --cflags dbus-1` -g -DDBUS_API_SUBJECT_TO_CHANGE -DVERSION="\"1.1\"" -o btpasskey btpasskey.c + $(CC) `pkg-config --libs --cflags dbus-1` -g -DDBUS_API_SUBJECT_TO_CHANGE -DVERSION="\"$(BTPASS_VERSION)\"" -o btpasskey btpasskey.c install: btpasskey - install -m 755 -o root btpasskey /usr/bin - install -m 644 -o root btpasskey.1 /usr/share/man/man1 + install -m 755 -o root btpasskey $(DESTDIR)$(prefix)/bin + install -m 644 -o root btpasskey.1 $(DESTDIR)$(prefix)/share/man/man1 +clean: + rm *.o btpasskey diff --git a/packaging/btpasskey-debian/changelog b/packaging/btpasskey-debian/changelog index 8490305..eab8373 100644 --- a/packaging/btpasskey-debian/changelog +++ b/packaging/btpasskey-debian/changelog @@ -1,3 +1,9 @@ +btpasskey (1.2-1) unstable; urgency=low + + * New upstream release + + -- Victor Wagner Sun, 11 Nov 2007 22:22:00 +0300 + btpasskey (1.0-1) unstable; urgency=low * Initial release (Closes: #nnnn) diff --git a/packaging/btpasskey-debian/control b/packaging/btpasskey-debian/control index 6dabbed..b662162 100644 --- a/packaging/btpasskey-debian/control +++ b/packaging/btpasskey-debian/control @@ -1,13 +1,13 @@ Source: btpasskey -Section: unknown +Section: admin Priority: extra Maintainer: Victor Wagner -Build-Depends: debhelper (>= 5), libdbus-1-dev, libbluetooth-dev +Build-Depends: debhelper (>= 5), libdbus-1-dev Standards-Version: 3.7.2 Package: btpasskey Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, bluez-utils Description: Command-line passkey agent for bluez linux stack btpasskey is small program which listens on D-BUS, and when passkey for pairing is requested, prints message on stdout and expects passkey to