diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-12-19 04:07:06 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-12-19 04:07:06 +0000 |
commit | 6249a27ea72b83726975bfa6771b226f325c1a95 (patch) | |
tree | 5c8111b1bccd25848d425aa6e6d05265ca2ff24a | |
parent | e620d0a9d88875c425741ad2d40579e61cdd15b0 (diff) | |
download | python-dmidecode-6249a27ea72b83726975bfa6771b226f325c1a95.tar.gz python-dmidecode-6249a27ea72b83726975bfa6771b226f325c1a95.tar.xz python-dmidecode-6249a27ea72b83726975bfa6771b226f325c1a95.zip |
Further work in enforcing the Debian policy in package based on advice from
`POX' and the documentation.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@119 abc39116-655e-4be6-ad55-d661dc543056
-rw-r--r-- | BUILD.Linux/dmidecode.spec | 47 | ||||
-rw-r--r-- | Makefile (renamed from dmidecode.makefile) | 5 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 12 | ||||
-rw-r--r-- | debian/dirs | 0 | ||||
-rw-r--r-- | debian/install | 0 | ||||
-rw-r--r-- | debian/python-dmidecode.substvars | 3 | ||||
-rwxr-xr-x | debian/rules | 8 |
8 files changed, 44 insertions, 33 deletions
diff --git a/BUILD.Linux/dmidecode.spec b/BUILD.Linux/dmidecode.spec index 2474e61..54c0458 100644 --- a/BUILD.Linux/dmidecode.spec +++ b/BUILD.Linux/dmidecode.spec @@ -1,37 +1,44 @@ -%define shortname dmidecode -%define name python-dmidecode -%define version 0.1 -%define unmangled_version 0.1 -%define release 1 - -Summary: Python wrapper around dmidecode -Name: %{name} -Version: %{version} -Release: %{release}.%{dist} +%define is_not_debian %(test -e /etc/debian_version && echo 1 || echo 0) + +Summary: Python extension module for dmidecode. +Name: python-dmidecode +Version: 2.10 +Release: 0%?{dist} Requires: redhat-lsb -Source: %{shortname}-%{unmangled_version}.tar.gz +Source: %{name}-%{version}.tar.gz License: GNU GPL v3 -Group: Development/Libraries -BuildRoot: %{_tmppath}/%{shortname}-buildroot +Group: System Environment/Libraries +BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Vendor: Autonomy <dmidecode-devel@autonojects.net.au> -BuildRequires: python-devel +%{?!is_not_debian:BuildRequires: python-devel} Url: http://projects.autonomy.net.au/dmidecode/ %description -The python module for dmidecode, written in C. + The Desktop Management Interface provides a standardized description of + a computer's hardware, including characteristics such as BIOS serial + number and hardware connectors. + + python-dmidecode provides an interface to the DMI data available from + the BIOS. It is intended to be used as a back-end tool by other + hardware detection programs implemented in python. %prep -%setup -n %{shortname}-%{unmangled_version} -python setup.py clean +%setup -q -n %{name}-%{version} +python src/setup.py clean %build -python setup.py build +python src/setup.py build %install -python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_OBJECTS +python src/setup.py install --root=%{buildroot} --record=INSTALLED_OBJECTS %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files -f INSTALLED_OBJECTS + +%changelog +* Fri Dec 19 2008 Nima Talebi <nima@it.net.au> - 2.10-0 +- Initial release + diff --git a/dmidecode.makefile b/Makefile index f4c9645..6c1a572 100644 --- a/dmidecode.makefile +++ b/Makefile @@ -7,7 +7,8 @@ #. PY := $(shell python -V 2>&1 |sed -e 's/.\(ython\) \(2\.[0-9]\)\..*/p\1\2/') -PY_VER = $(shell python -c 'import sys;print(sys.version[0:3])') +PY_VER := $(subst python,,$(PY)) + CC := gcc RM := rm -f SRC_D := src @@ -35,7 +36,7 @@ vpath % $(OBJ_D) ############################################################################### build: dmidecode.so dmidecode.so: $(SO) - cp $< . + cp $< $(PY)-$@ $(SO): $(PY) src/setup.py build diff --git a/debian/changelog b/debian/changelog index e8b3ad2..d75e6f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -dmidecode (0.1-1) unstable; urgency=low +python-dmidecode (2.10-1) unstable; urgency=low * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP> diff --git a/debian/control b/debian/control index e443346..f0fcb19 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,14 @@ -Source: dmidecode +Source: python-dmidecode +XS-Python-Version: (>= 2.3) Section: utils Priority: optional -Maintainer: Nima Talebi <nima@autonomy.net.au> +Maintainer: Nima Talebi <nima@it.net.au> Build-Depends: debhelper (>= 5), python-all-dev (>= 2.3.5-11), python-central (>= 0.6) -Standards-Version: 3.7.2 -XB-Python-Version: ${python:Versions} -XS-Python-Version: current +Standards-Version: 3.8.0 Package: python-dmidecode -Architecture: i386 +XB-Python-Version: ${python:Versions} +Architecture: any Provides: ${python:Provides} Depends: ${python:Depends}, ${shlibs:Depends} Description: Python extension module for dmidecode. diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index e69de29..0000000 --- a/debian/dirs +++ /dev/null diff --git a/debian/install b/debian/install deleted file mode 100644 index e69de29..0000000 --- a/debian/install +++ /dev/null diff --git a/debian/python-dmidecode.substvars b/debian/python-dmidecode.substvars index 36e5a58..e3510f6 100644 --- a/debian/python-dmidecode.substvars +++ b/debian/python-dmidecode.substvars @@ -1 +1,4 @@ +python:Versions=2.4, 2.5 +python:Provides=python2.4-dmidecode, python2.5-dmidecode +python:Depends=python-central (>= 0.6.7), python (<< 2.6), python (>= 2.4) shlibs:Depends=libc6 (>= 2.7-1) diff --git a/debian/rules b/debian/rules index 98488c4..40f5a22 100755 --- a/debian/rules +++ b/debian/rules @@ -11,8 +11,8 @@ PYVERS = python2.4 python2.5 build: build-stamp build-stamp: $(PYVERS:%=build-ext-%) dh_testdir - #docbook-to-man debian/dmidecode.sgml > dmidecode.1 - #$(MAKE) -f dmidecode.makefile + #docbook-to-man debian/python-dmidecode.sgml > python-dmidecode.1 + #$(MAKE) -f Makefile touch $@ build-ext-%: $(subst $(PYDEF),python,$*) src/setup.py build @@ -24,7 +24,7 @@ install: install-stamp dh_testdir dh_testroot dh_installdirs - #$(MAKE) DESTDIR=$(CURDIR)/debian/dmidecode install + #$(MAKE) DESTDIR=$(CURDIR)/debian/python-dmidecode install install-stamp: build-stamp $(PYVERS:%=install-ext-%) install-ext-%: $(subst $(PYDEF),python,$*) src/setup.py install --root $(CURDIR)/debian/python-dmidecode @@ -37,7 +37,7 @@ clean: dh_testroot -rm -f build-stamp configure-stamp -rm -rf $(CURDIR)/debian/python-dmidecode - -$(MAKE) -f dmidecode.makefile clean + -$(MAKE) -f Makefile clean dh_clean |