Skip to content

Commit d866a37

Browse files
author
nima
committed
Applied the nice changes suggested by Piotr Ożarowsk.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@164 abc39116-655e-4be6-ad55-d661dc543056
1 parent 25f310a commit d866a37

3 files changed

Lines changed: 63 additions & 49 deletions

File tree

Makefile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ build: $(PY)-dmidecode.so
4141
$(PY)-dmidecode.so: $(SO)
4242
cp $< $@
4343

44+
build: $(SO)
4445
$(SO):
4546
$(PY) src/setup.py build
4647

4748
install:
48-
$(PY) src/setup.py uninstall
49+
$(PY) src/setup.py install
4950

5051
uninstall:
5152
$(PY) src/setup.py uninstall
@@ -58,18 +59,22 @@ clean :
5859

5960
###############################################################################
6061
#. Debian
61-
.srcsrv: $(SRCSRV)/$(PACKAGE)/$(PACKAGE)_$(VERSION).orig.tar.gz
62-
$(SRCSRV)/$(PACKAGE)/$(PACKAGE)_$(VERSION).orig.tar.gz: ../$(PACKAGE)_$(VERSION).orig.tar.gz
63-
cp $< $@
62+
all: source binary
6463

64+
source: debian orig.tar.gz
65+
cp ../tarballs/$(PACKAGE)_$(VERSION).orig.tar.gz ../$(PACKAGE)_$(VERSION).orig.tar.gz
66+
debuild -S -sa -i
67+
mv ../$(PACKAGE)_$(VERSION)* ../sources
68+
lintian --verbose -iI ../sources/$(PACKAGE)_$(VERSION)-1_source.changes
69+
scp ../sources/$(PACKAGE)_$(VERSION).orig.tar.gz nima@src.autonomy.net.au:/var/www/nima/sites/src.autonomy.net.au/pub/$(PACKAGE)/
6570
orig.tar.gz: ../tarballs/$(PACKAGE)_$(VERSION).orig.tar.gz
6671
../tarballs/$(PACKAGE)_$(VERSION).orig.tar.gz: clean .
6772
cd .. && tar czvf tarballs/$(PACKAGE)_$(VERSION).orig.tar.gz \
6873
--exclude "*.svn" \
6974
--exclude debian \
7075
--exclude redhat \
7176
--exclude private \
72-
$(PACKAGE)
77+
$(PACKAGE)-$(VERSION)
7378
touch $@
7479

7580
binary: debian orig.tar.gz
@@ -78,13 +83,6 @@ binary: debian orig.tar.gz
7883
lintian --verbose -c ../build-area/$(PACKAGE)_$(VERSION)-1_i386.deb
7984
lintian --verbose -iI ../build-area/$(PACKAGE)_$(VERSION)-1_i386.changes
8085

81-
source: debian orig.tar.gz
82-
cp ../tarballs/$(PACKAGE)_$(VERSION).orig.tar.gz ../$(PACKAGE)_$(VERSION).orig.tar.gz
83-
debuild -S -sa -i
84-
mv ../$(PACKAGE)_$(VERSION)* ../sources
85-
lintian --verbose -iI ../sources/$(PACKAGE)_$(VERSION)-1_source.changes
86-
scp ../sources/$(PACKAGE)_$(VERSION).orig.tar.gz nima@ntrust.net.au:/var/www/nima/sites/src.autonomy.net.au/pub/$(PACKAGE)/
87-
8886
dupload: debian source
8987
cd ../sources && dupload -t mentors $(PACKAGE)_$(VERSION)-1_source.changes
9088

@@ -110,5 +108,5 @@ $(OBJ_D)/dmioem.o: dmioem.c types.h dmidecode.h dmioem.h
110108

111109

112110
###############################################################################
113-
.PHONY: install clean uninstall module build dupload
114-
.PHONY: binary source orig.tar.gz
111+
.PHONY: install clean uninstall build dupload
112+
.PHONY: srcsrv binary source orig.tar.gz all

debian/control

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,32 @@ XS-Python-Version: >= 2.3
33
Section: python
44
Priority: optional
55
Maintainer: Nima Talebi <nima@it.net.au>
6-
Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-11), python-central (>= 0.6)
6+
Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-11), python-central (>= 0.6), python-all-dbg
77
Standards-Version: 3.8.0
88

99
Package: python-dmidecode
1010
XB-Python-Version: ${python:Versions}
1111
Architecture: any
1212
Provides: ${python:Provides}
13-
Depends: ${python:Depends}, ${shlibs:Depends}
14-
Description: Python Extension Module for DMIDecode
13+
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
14+
Description: Python extension module for dmidecode
1515
DMI (the desktop management interface) provides a standardized description of
1616
a computer's hardware, including characteristics such as BIOS serial number
1717
and hardware connectors.
1818
.
1919
This package provides an interface to the DMI data available from the BIOS.
2020
It is intended to be used as a back-end tool by other hardware detection
2121
programs implemented in Python.
22+
23+
Package: python-dmidecode-dbg
24+
Architecture: any
25+
Priority: extra
26+
Depends: python-dmidecode (= ${binary:Version}), python-dbg, ${shlibs:Depends}, ${misc:Depends}
27+
Provides: ${python:Provides}
28+
XB-Python-Version: ${python:Versions}
29+
Description: Python extension module for DMIDecode
30+
DMI (the desktop management interface) provides a standardized description of
31+
a computer's hardware, including characteristics such as BIOS serial number
32+
and hardware connectors.
33+
.
34+
This package contains the extension built for the Python debug interpreter.

debian/rules

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,70 @@
11
#!/usr/bin/make -f
22

33
#export DH_VERBOSE=1
4-
PYDEF = $(shell pyversions -d)
5-
PYVERS = $(shell pyversions -r)
4+
PYVERS = $(shell pyversions -vr)
65

7-
8-
#############
9-
### Build ###
6+
################################################################################
7+
#. Build
108
build: build-stamp
11-
build-stamp: $(PYVERS:%=build-ext-%)
9+
build-stamp: $(PYVERS:%=build-ext-%) $(PYVERS:%=build-dbg-ext-%)
1210
dh_testdir
13-
#docbook-to-man debian/python-dmidecode.sgml > python-dmidecode.1
14-
#$(MAKE) -f Makefile
1511
touch $@
1612
build-ext-%:
17-
$(subst $(PYDEF),python,$*) src/setup.py build
13+
python$* src/setup.py build
14+
touch $@
15+
build-dbg-ext-%:
16+
python$*-dbg src/setup.py build
17+
touch $@
1818

1919

20-
###############
21-
### Install ###
20+
################################################################################
21+
#. Install
2222
install: install-stamp
2323
dh_testdir
2424
dh_testroot
2525
dh_installdirs
26-
#$(MAKE) DESTDIR=$(CURDIR)/debian/python-dmidecode install
27-
install-stamp: build-stamp $(PYVERS:%=install-ext-%)
26+
install-stamp: build-stamp $(PYVERS:%=install-ext-%) $(PYVERS:%=install-dbg-ext-%)
2827
install-ext-%:
29-
$(subst $(PYDEF),python,$*) src/setup.py install --root $(CURDIR)/debian/python-dmidecode
30-
31-
32-
#############
33-
### Clean ###
34-
clean:
35-
dh_testdir
36-
dh_testroot
37-
-rm -f build-stamp configure-stamp
38-
-rm -rf $(CURDIR)/debian/python-dmidecode
39-
$(MAKE) -f Makefile clean
40-
dh_clean
41-
28+
python$* src/setup.py install --root $(CURDIR)/debian/python-dmidecode
29+
touch $@
30+
install-dbg-ext-%:
31+
python$*-dbg src/setup.py install --root $(CURDIR)/debian/python-dmidecode-dbg
32+
find $(CURDIR)/debian/python-dmidecode-dbg/usr/lib/python$*/ ! -type d ! -name '*_d\.so' -delete
33+
find $(CURDIR)/debian/python-dmidecode-dbg/usr/lib/python$*/ -depth -empty -delete
34+
touch $@
4235

43-
binary-indep: build install
4436

37+
################################################################################
38+
#. Binary
39+
binary: binary-indep binary-arch
40+
binary-indep:
4541
binary-arch: build install
4642
dh_testdir
4743
dh_testroot
4844
dh_installchangelogs
4945
dh_installdocs
5046
dh_installexamples
5147
dh_install
52-
# dh_python
53-
# dh_pysupport
5448
dh_pycentral
5549
dh_installman
5650
dh_strip
5751
dh_compress
5852
dh_fixperms
59-
# dh_makeshlibs
6053
dh_installdeb
6154
dh_shlibdeps
6255
dh_gencontrol
6356
dh_md5sums
6457
dh_builddeb
6558

66-
binary: binary-indep binary-arch
67-
.PHONY: build clean binary-indep binary-arch binary install configure
59+
60+
################################################################################
61+
#. Clean
62+
clean:
63+
dh_testdir
64+
dh_testroot
65+
$(MAKE) -f Makefile clean
66+
dh_clean build-stamp install-stamp \
67+
$(PYVERS:%=install-ext-%) $(PYVERS:%=build-ext-%) \
68+
$(PYVERS:%=install-dbg-ext-%) $(PYVERS:%=build-dbg-ext-%)
69+
70+
.PHONY: build clean binary-indep binary-arch binary install

0 commit comments

Comments
 (0)