Browse Source

several updates, proper python setup.py

git-svn-id: https://ssl.recluse.de/svn/debian/trunk/packages/gpsd@273 9c2cd6cd-4e54-406b-9ece-f07a8ab7d216
tags/debian/2.37-6
bzed 13 years ago
parent
commit
2435c7c0c3
5 changed files with 211 additions and 4 deletions
  1. +21
    -3
      debian/control
  2. +2
    -1
      debian/copyright
  3. +1
    -0
      debian/patches/00list
  4. +56
    -0
      debian/patches/python-setup.dpatch
  5. +131
    -0
      debian/rules

+ 21
- 3
debian/control View File

@@ -2,14 +2,14 @@ Source: gpsd
Section: misc
Priority: optional
Maintainer: Bernd Zeimetz <bernd@bzed.de>
Build-Depends: debhelper (>= 5), po-debconf, dpatch, autotools-dev, python, python-support (>= 0.4), xmlto, docbook-xsl (>= 1.70.1.dfsg.1-0.1), chrpath, libxt-dev, lesstif2-dev, libxaw7-dev, libncurses-dev, libdbus-1-dev, libglib2.0-dev, libdbus-glib-1-dev
Build-Depends: debhelper (>= 5), po-debconf, dpatch, autotools-dev, python, python-support (>= 0.4)
Standards-Version: 3.7.2
Homepage: http://gpsd.berlios.de/

Package: gpsd
Architecture: any
Depends: netbase, lsb-base (>= 3.0-6), ${shlibs:Depends}, ${misc:Depends}
Recommends: gpsd-clients, python (>= 2.3)
Recommends: gpsd-clients
Suggests: udev
Description: GPS (Global Positioning System) daemon
gpsd is a service daemon that monitors one or more GPSes attached to a host
@@ -30,7 +30,7 @@ Description: GPS (Global Positioning System) daemon

Package: gpsd-clients
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, python-gps
Description: Clients for the GPS daemon
gpsd is a service daemon that monitors one or more GPSes attached to a host
computer through serial or USB ports, making all data on the location/course/
@@ -45,3 +45,21 @@ Description: Clients for the GPS daemon
This package contains auxiliary tools for diagnostic monitoring and profiling
of GPSes and feeding GPS-aware applications specified track data for
diagnostic purposes.

Package: python-gps
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}
Section: python
Description: Python interface to gpsd and testing environment
gpsd is a service daemon that monitors one or more GPSes attached to a host
computer through serial or USB ports, making all data on the location/course/
velocity of the sensors available to be queried on TCP port 2947 of the host
computer.
.
With gpsd, multiple GPS client applications (such as navigational and war-
driving software) can share access to GPSes without contention or loss of
data. Also, gpsd responds to queries with a format that is substantially
easier to parse than the NMEA 0183 emitted by most GPSes.
.
This package contains a pure Python interface to gpsd, together with a
module providing a controlled testing environment.

+ 2
- 1
debian/copyright View File

@@ -125,7 +125,8 @@ Files with different copyrights/licenses:
Copyright (c) 2005,2006 Chris Kuethe <chris.kuethe@gmail.com>

License: ISC, see below

Missing license information in gpsflash.c and sirfflash.c was added in
svn, r4420 - http://svn.berlios.de/wsvn/gpsd/

* strl.c:



+ 1
- 0
debian/patches/00list View File

@@ -0,0 +1 @@
python-setup

+ 56
- 0
debian/patches/python-setup.dpatch View File

@@ -0,0 +1,56 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## python-setup.dpatch by Bernd Zeimetz <bernd@bzed.de>
##
## DP: creating a proper setup.py to be able to install the python
## DP: files properly

@DPATCH@
diff -urNad gpsd~/setup.py gpsd/setup.py
--- gpsd~/setup.py 2006-12-15 00:43:39.000000000 +0100
+++ gpsd/setup.py 2007-10-13 01:15:17.000000000 +0200
@@ -1,8 +1,41 @@
# $Id: setup.py 4076 2006-12-05 02:00:19Z esr $
# Creates build/lib.linux-${arch}-${pyvers}/gpspacket.so,
# where ${arch} is an architecture and ${pyvers} is a Python version.
+
from distutils.core import setup, Extension
-setup(name="gpspacket", version="1.0",
- ext_modules=[Extension("gpspacket",
- ["gpspacket.c", "packet.c",
- "isgps.c", "rtcm.c", "strl.c", "hex.c"])])
+from distutils.command.build_ext import build_ext as _build_ext
+
+import os
+
+class build_ext(_build_ext):
+
+ def run(self):
+ p_names = 'packet_names.h'
+ p_names_created = False
+ if not os.path.exists(p_names):
+ sed = """sed -e '/^ *\\([A-Z][A-Z0-9_]*\\),/s// "\\1",/' -e '/_states/s//_names/' packet_states.h"""
+ p_names_created = True
+ sed_in, sed_out = os.popen2(sed)
+ p_names_fd = open(p_names, 'w')
+ p_names_fd.write(sed_out.read())
+ sed_in.close()
+ sed_out.close()
+ p_names_fd.close()
+
+ _build_ext.run(self)
+
+ if p_names_created:
+ os.remove(p_names)
+
+
+extension_source = ["gpspacket.c", "packet.c", "isgps.c",
+ "rtcm.c", "strl.c", "hex.c"]
+
+setup( cmdclass={'build_ext': build_ext},
+ name="gpspacket",
+ version="1.0",
+ ext_modules=[Extension("gpspacket", extension_source)],
+ py_modules = ['gpsfake','gps'],
+ data_files=[('bin', ['gpsfake','gps'])]
+ )
+

+ 131
- 0
debian/rules View File

@@ -0,0 +1,131 @@
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

CONFFLAGS =
CFLAGS =
LDFLAGS =
CPPFLAGS =


#let's help configure to figure out our host/build system
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif



#where our files go
PREFIX = /usr
MANDIR = $(PREFIX)/share/man
INFODIR = $(PREFIX)/share/info
CONFFLAGS += --prefix=$(PREFIX) --mandir=$(MANDIR) --infodir=$(INFODIR)



#let's take care of optimization + debug builds
CFLAGS += -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
CONFFLAGS += CFLAGS="$(CFLAGS)"



#Disallow undefined symbols in object files
LDFLAGS += -Wl,-z,defs
CONFFLAGS += LDFLAGS="$(LDFLAGS)"



config.status: patch configure
dh_testdir

ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
./configure $(CONFFLAGS)


build: build-stamp
build-stamp: config.status
dh_testdir

# Add here commands to compile the package.
$(MAKE)

touch $@


clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot

ifneq "$(wildcard /usr/share/misc/config.sub)" ""
rm -f config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
rm -f config.guess
endif
dh_clean



install: install-bin install-python install-lib install-lib-dev
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs

$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install


binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_installdocs -i
dh_install -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i

binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs -s ChangeLog
dh_installdocs -s
dh_installexamples -s
dh_install -s
dh_installmenu -s
dh_desktop -s
dh_installman -s
dh_link -s
dh_strip -s
dh_compress -s
dh_fixperms -s
dh_installdeb -s
dh_shlibdeps -s
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

Loading…
Cancel
Save