1
by Guillaume BOTTEX
Import upstream version 1.0.0 |
1 |
################################################################################
|
2 |
# Linux Management Providers (LMP), Sensors provider package
|
|
3 |
# Copyright (C) 2009 Shakhrom RUSTAMOV <shahrombek@gmail.com>
|
|
4 |
#
|
|
5 |
# This program is being developed under the "OpenDRIM" project.
|
|
6 |
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
|
|
7 |
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
|
|
8 |
#
|
|
9 |
# This program is free software; you can redistribute it and/or
|
|
10 |
# modify it under the terms of the GNU General Public License
|
|
11 |
# as published by the Free Software Foundation; version 2
|
|
12 |
# of the License.
|
|
13 |
#
|
|
14 |
# This program is distributed in the hope that it will be useful,
|
|
15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 |
# GNU General Public License for more details.
|
|
18 |
#
|
|
19 |
# You should have received a copy of the GNU General Public License
|
|
20 |
# along with this program; if not, write to the Free Software
|
|
21 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
22 |
#################################################################################
|
|
23 |
||
24 |
#################################################################################
|
|
25 |
# To contributors, please leave your contact information in this section
|
|
26 |
# AND comment your changes in the source code.
|
|
27 |
#
|
|
28 |
# Modified by 2009 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr>
|
|
29 |
################################################################################
|
|
30 |
||
31 |
VENDOR = OpenDRIM |
|
32 |
||
33 |
VERSION = $(shell cat ./VERSION) |
|
34 |
||
35 |
APP_NAME = opendrim-lmp-sensors |
|
36 |
||
37 |
RPM_PACKAGE_DIR = packaging |
|
38 |
||
39 |
PLATFORM = $(shell rpm --eval %_target_cpu) |
|
40 |
||
41 |
WORKING_DIR = $(shell pwd) |
|
42 |
||
43 |
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 |
|
44 |
||
45 |
postinstall: |
|
46 |
registration/Sensors.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . |
|
47 |
||
48 |
preuninstall: |
|
49 |
registration/Sensors-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . |
|
50 |
||
51 |
test-OpenDRIM_AssociatedProcessorVoltageSensor: all |
|
52 |
make -C test test-OpenDRIM_AssociatedProcessorVoltageSensor
|
|
53 |
||
54 |
test-OpenDRIM_SensorConformsToProfile: all |
|
55 |
make -C test test-OpenDRIM_SensorConformsToProfile
|
|
56 |
||
57 |
test-OpenDRIM_SensorCapabilities: all |
|
58 |
make -C test test-OpenDRIM_SensorCapabilities
|
|
59 |
||
60 |
test-OpenDRIM_BatteryTempratureSensor: all |
|
61 |
make -C test test-OpenDRIM_BatteryTempratureSensor
|
|
62 |
||
63 |
test-OpenDRIM_ComputerSystemSensor: all |
|
64 |
make -C test test-OpenDRIM_ComputerSystemSensor
|
|
65 |
||
66 |
test-OpenDRIM_Sensor: all |
|
67 |
make -C test test-OpenDRIM_Sensor
|
|
68 |
||
69 |
test-OpenDRIM_RegisteredSensorsProfile: all |
|
70 |
make -C test test-OpenDRIM_RegisteredSensorsProfile
|
|
71 |
||
72 |
test-OpenDRIM_ProcessorVoltageSensor: all |
|
73 |
make -C test test-OpenDRIM_ProcessorVoltageSensor
|
|
74 |
||
75 |
test-OpenDRIM_AssociatedBatterySensor: all |
|
76 |
make -C test test-OpenDRIM_AssociatedBatterySensor
|
|
77 |
||
78 |
test-OpenDRIM_NumericSensor: all |
|
79 |
make -C test test-OpenDRIM_NumericSensor
|
|
80 |
||
81 |
test-OpenDRIM_AssociatedSensor: all |
|
82 |
make -C test test-OpenDRIM_AssociatedSensor
|
|
83 |
||
84 |
test-OpenDRIM_EnabledSensorCapabilities: all |
|
85 |
make -C test test-OpenDRIM_EnabledSensorCapabilities
|
|
86 |
||
87 |
pkg-src: |
|
88 |
rm -rf packaging/$(APP_NAME)-$(VERSION) |
|
89 |
rm -rf .tmp |
|
90 |
mkdir .tmp |
|
91 |
cp -r ./* .tmp/ |
|
92 |
rm -rf ./tmp/packaging/ |
|
93 |
mv .tmp packaging/$(APP_NAME)-$(VERSION) |
|
94 |
tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION) |
|
95 |
rm -rf packaging/$(APP_NAME)-$(VERSION) |
|
96 |
||
97 |
pkg-rpm: pkg-src |
|
98 |
mkdir -p $(RPM_PACKAGE_DIR)/rpm/RPMS/$(PLATFORM) |
|
99 |
mkdir -p $(RPM_PACKAGE_DIR)/rpm/SRPMS |
|
100 |
mkdir -p $(RPM_PACKAGE_DIR)/rpm/BUILD |
|
101 |
mkdir -p $(RPM_PACKAGE_DIR)/rpm/SOURCES |
|
102 |
mkdir -p $(RPM_PACKAGE_DIR)/rpm/tmp |
|
103 |
- rm -r $(RPM_PACKAGE_DIR)/rpm/BUILD/$(APP_NAME)-root |
|
104 |
- rm -r $(RPM_PACKAGE_DIR)/rpm/RPMS/$(APP_NAME)-* |
|
105 |
- rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-* |
|
106 |
- rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-* |
|
107 |
mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ |
|
108 |
rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec |
|
109 |
||
110 |
pkg-deb: pkg-src |
|
111 |
cp packaging/$(APP_NAME)-$(VERSION).tar.gz packaging/$(APP_NAME)-$(VERSION).orig.tar.gz |
|
112 |
cd packaging/ && tar axf $(APP_NAME)-$(VERSION).tar.gz |
|
113 |
cp -R packaging/debian packaging/$(APP_NAME)-$(VERSION) |
|
114 |
- cd packaging/$(APP_NAME)-$(VERSION) && dpkg-buildpackage -b |
|
115 |
rm -rf packaging/$(APP_NAME)-$(VERSION)* packaging/*.changes |
|
116 |