Skip to content

Commit 46632c5

Browse files
author
nima
committed
Debianizing dmidecode.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@110 abc39116-655e-4be6-ad55-d661dc543056
1 parent d4241f4 commit 46632c5

5 files changed

Lines changed: 75 additions & 17 deletions

File tree

BUILD.Linux/dmidecode.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ Summary: Python wrapper around dmidecode
88
Name: %{name}
99
Version: %{version}
1010
Release: %{release}.%{dist}
11+
Requires: redhat-lsb
1112
Source: %{shortname}-%{unmangled_version}.tar.gz
1213
License: GNU GPL v3
1314
Group: Development/Libraries
1415
BuildRoot: %{_tmppath}/%{shortname}-buildroot
1516
Prefix: %{_prefix}
16-
Vendor: Nima Talebi, Joel Heenan, Vaughan Whitteron <dmidecode-devel@autonojects.net.au>
17+
Vendor: Autonomy <dmidecode-devel@autonojects.net.au>
1718
BuildRequires: python-devel
1819
Url: http://projects.autonomy.net.au/dmidecode/
1920

Makefile renamed to dmidecode.makefile

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#.
88

99
PY := $(shell python -V 2>&1 |sed -e 's/.\(ython\) \(2\.[0-9]\)\..*/p\1\2/')
10+
PY_VER = $(shell python -c 'import sys;print(sys.version[0:3])')
1011
CC := gcc
1112
RM := rm -f
1213
SRC_D := src
@@ -23,7 +24,7 @@ CFLAGS += -O3
2324
#LDFLAGS = -lefence
2425
LDFLAGS =
2526
SOFLAGS = -pthread -shared -L/home/nima/dev-room/projects/dmidecode -lutil
26-
SO = /usr/lib/$(PY)/site-packages/dmidecode.so
27+
SO = build/lib.linux-$(shell uname -m)-$(PY_VER)/dmidecode.so
2728

2829
#. Search
2930
vpath %.o $(OBJ_D)
@@ -32,34 +33,30 @@ vpath %.h $(SRC_D)
3233
vpath % $(OBJ_D)
3334

3435
###############################################################################
35-
install: build
36-
$(PY) src/setup.py install
36+
build: dmidecode.so
37+
dmidecode.so: $(SO)
38+
cp $< .
3739

38-
build:
40+
$(SO):
3941
$(PY) src/setup.py build
4042

41-
4243
###############################################################################
43-
SO: libdmidecode.so
44-
cp $< $@
45-
nm -u $@
46-
4744
libdmidecode.so: dmihelper.o util.o dmioem.o dmidecode.o dmidecodemodule.o
4845
$(CC) $(LDFLAGS) $(SOFLAGS) $^ -o $@
4946

50-
dmidecodemodule.o: dmidecodemodule.c
47+
$(OBJ_D)/dmidecodemodule.o: dmidecodemodule.c
5148
$(CC) $(CFLAGS) -c -o $@ $<
5249

53-
dmidecode.o: dmidecode.c version.h types.h util.h config.h dmidecode.h dmioem.h
50+
$(OBJ_D)/dmidecode.o: dmidecode.c version.h types.h util.h config.h dmidecode.h dmioem.h
5451
$(CC) $(CFLAGS) -c -o $@ $<
5552

56-
dmihelper.o: dmihelper.c dmihelper.h
53+
$(OBJ_D)/dmihelper.o: dmihelper.c dmihelper.h
5754
$(CC) $(CFLAGS) -c -o $@ $<
5855

59-
util.o: util.c types.h util.h config.h
56+
$(OBJ_D)/util.o: util.c types.h util.h config.h
6057
$(CC) $(CFLAGS) -c -o $@ $<
6158

62-
dmioem.o: dmioem.c types.h dmidecode.h dmioem.h
59+
$(OBJ_D)/dmioem.o: dmioem.c types.h dmidecode.h dmioem.h
6360
$(CC) $(CFLAGS) -c -o $@ $<
6461

6562

@@ -70,7 +67,7 @@ uninstall:
7067

7168
clean :
7269
$(PY) src/setup.py clean
73-
-$(RM) lib/*.so lib/*.o core
70+
-$(RM) *.so lib/*.o core
7471
-rm -rf build
7572

76-
.PHONY: install clean uninstall module
73+
.PHONY: install clean uninstall module build

doc/README.types

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Type Information
2+
----------------------------------------
3+
0 BIOS
4+
1 System
5+
2 Base Board
6+
3 Chassis
7+
4 Processor
8+
5 Memory Controller
9+
6 Memory Module
10+
7 Cache
11+
8 Port Connector
12+
9 System Slots
13+
10 On Board Devices
14+
11 OEM Strings
15+
12 System Configuration Options
16+
13 BIOS Language
17+
14 Group Associations
18+
15 System Event Log
19+
16 Physical Memory Array
20+
17 Memory Device
21+
18 32-bit Memory Error
22+
19 Memory Array Mapped Address
23+
20 Memory Device Mapped Address
24+
21 Built-in Pointing Device
25+
22 Portable Battery
26+
23 System Reset
27+
24 Hardware Security
28+
25 System Power Controls
29+
26 Voltage Probe
30+
27 Cooling Device
31+
28 Temperature Probe
32+
29 Electrical Current Probe
33+
30 Out-of-band Remote Access
34+
31 Boot Integrity Services
35+
32 System Boot
36+
33 64-bit Memory Error
37+
34 Management Device
38+
35 Management Device Component
39+
36 Management Device Threshold Data
40+
37 Memory Channel
41+
38 IPMI Device
42+
39 Power Supply
43+
44+
45+
Keyword Types
46+
------------------------------
47+
bios 0, 13
48+
system 1, 12, 15, 23, 32
49+
baseboard 2, 10
50+
chassis 3
51+
processor 4
52+
memory 5, 6, 16, 17
53+
cache 7
54+
connector 8
55+
slot 9

doc/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dmidecode (0.1) unstable; urgency=low
2+
3+
* Initial release.
4+
5+
-- Nima Talebi <nima@autonomy.net.au> Wed, 17 Dec 2008 19:11:34 +0900

private/mem-001

2.17 KB
Binary file not shown.

0 commit comments

Comments
 (0)