~scarneiro/ubuntu/oneiric/opendrim-lmp-sensors/fix-for-756024

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
################################################################################
# Linux Management Providers (LMP), Sensors provider package
# Copyright (C) 2009 Shakhrom RUSTAMOV <shahrombek@gmail.com>
# 
# This program is being developed under the "OpenDRIM" project.
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#################################################################################

#################################################################################
# To contributors, please leave your contact information in this section
# AND comment your changes in the source code.
# 
# Modified by 2009 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr>
################################################################################

VENDOR = OpenDRIM

VERSION = $(shell cat ./VERSION)

APP_NAME = opendrim-lmp-sensors

RPM_PACKAGE_DIR = packaging

PLATFORM = $(shell rpm --eval %_target_cpu)

WORKING_DIR = $(shell pwd)

SUBDIRS = Common OpenDRIM_BatteryTempratureSensor OpenDRIM_Sensor OpenDRIM_RegisteredSensorsProfile OpenDRIM_ProcessorVoltageSensor OpenDRIM_NumericSensor OpenDRIM_EnabledSensorCapabilities OpenDRIM_AssociatedProcessorVoltageSensor OpenDRIM_SensorConformsToProfile OpenDRIM_SensorCapabilities OpenDRIM_ComputerSystemSensor OpenDRIM_AssociatedBatterySensor OpenDRIM_AssociatedSensor test

postinstall:
	registration/Sensors.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) .

preuninstall:
	registration/Sensors-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ .

test-OpenDRIM_AssociatedProcessorVoltageSensor: all
	make -C test test-OpenDRIM_AssociatedProcessorVoltageSensor
	
test-OpenDRIM_SensorConformsToProfile: all
	make -C test test-OpenDRIM_SensorConformsToProfile
	
test-OpenDRIM_SensorCapabilities: all
	make -C test test-OpenDRIM_SensorCapabilities
	
test-OpenDRIM_BatteryTempratureSensor: all
	make -C test test-OpenDRIM_BatteryTempratureSensor
	
test-OpenDRIM_ComputerSystemSensor: all
	make -C test test-OpenDRIM_ComputerSystemSensor
	
test-OpenDRIM_Sensor: all
	make -C test test-OpenDRIM_Sensor
	
test-OpenDRIM_RegisteredSensorsProfile: all
	make -C test test-OpenDRIM_RegisteredSensorsProfile
	
test-OpenDRIM_ProcessorVoltageSensor: all
	make -C test test-OpenDRIM_ProcessorVoltageSensor
	
test-OpenDRIM_AssociatedBatterySensor: all
	make -C test test-OpenDRIM_AssociatedBatterySensor
	
test-OpenDRIM_NumericSensor: all
	make -C test test-OpenDRIM_NumericSensor
	
test-OpenDRIM_AssociatedSensor: all
	make -C test test-OpenDRIM_AssociatedSensor
	
test-OpenDRIM_EnabledSensorCapabilities: all
	make -C test test-OpenDRIM_EnabledSensorCapabilities
	
pkg-src:
	rm -rf packaging/$(APP_NAME)-$(VERSION)
	rm -rf .tmp
	mkdir .tmp
	cp -r ./* .tmp/
	rm -rf ./tmp/packaging/
	mv .tmp packaging/$(APP_NAME)-$(VERSION)
	tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION)
	rm -rf packaging/$(APP_NAME)-$(VERSION)

pkg-rpm: pkg-src
	mkdir -p $(RPM_PACKAGE_DIR)/rpm/RPMS/$(PLATFORM)
	mkdir -p $(RPM_PACKAGE_DIR)/rpm/SRPMS
	mkdir -p $(RPM_PACKAGE_DIR)/rpm/BUILD
	mkdir -p $(RPM_PACKAGE_DIR)/rpm/SOURCES
	mkdir -p $(RPM_PACKAGE_DIR)/rpm/tmp
	- rm -r $(RPM_PACKAGE_DIR)/rpm/BUILD/$(APP_NAME)-root
	- rm -r $(RPM_PACKAGE_DIR)/rpm/RPMS/$(APP_NAME)-*
	- rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-*
	- rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-*
	mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/
	rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec
	
pkg-deb: pkg-src
	cp packaging/$(APP_NAME)-$(VERSION).tar.gz packaging/$(APP_NAME)-$(VERSION).orig.tar.gz
	cd packaging/ && tar axf $(APP_NAME)-$(VERSION).tar.gz
	cp -R packaging/debian packaging/$(APP_NAME)-$(VERSION)
	- cd packaging/$(APP_NAME)-$(VERSION) && dpkg-buildpackage -b
	rm -rf packaging/$(APP_NAME)-$(VERSION)* packaging/*.changes