]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - pkgs/core/iscsi-initiator-utils/iscsi-initiator-utils.nm
iscsi-initiator-utils: New package.
[people/stevee/ipfire-3.x.git] / pkgs / core / iscsi-initiator-utils / iscsi-initiator-utils.nm
CommitLineData
cdd964e9
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include $(PKGROOT)/Include
26
27PKG_NAME = iscsi-initiator-utils
28PKG_VER = 6.2.0.872
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = Networking/Tools
33PKG_URL = http://bridge.sourceforge.net/
34PKG_LICENSE = GPLv2+
35PKG_SUMMARY = iSCSI daemon and utility programs.
36
37PKG_BUILD_DEPS+= openssl-devel python-devel
38
39define PKG_DESCRIPTION
40 The iscsi package provides the server daemon for the iSCSI protocol, \
41 as well as the utility programs used to manage it. iSCSI is a protocol \
42 for distributed disk access using SCSI commands sent over Internet \
43 Protocol networks.
44endef
45
46PKG_PACKAGES += libiscsi libiscsi-devel
47
48define PKG_FILES-libiscsi
49 /usr/lib/libiscsi.so.*
50endef
51
52define PKG_FILES-libiscsi-devel
53 /usr/lib/libiscsi.so
54 /usr/include
55endef
56
57PKG_TARBALL = open-iscsi-2.0-872-rc4-bnx2i.tar.gz
58DIR_APP = $(DIR_SRC)/open-iscsi-2.0-872-rc4-bnx2i
59
60define STAGE_PREPARE_CMDS
61 cd $(DIR_APP)/libiscsi && sed -e "s/^all.*/all: lib tests/" -i Makefile
62endef
63
64define STAGE_BUILD
65 cd $(DIR_APP)/utils/open-isns && ./configure
66 cd $(DIR_APP)/utils/open-isns && make
67 cd $(DIR_APP) && make -C utils/sysdeps
68 cd $(DIR_APP) && make -C utils/fwparam_ibft
69 cd $(DIR_APP) && make -C usr
70 cd $(DIR_APP) && make -C utils
71 cd $(DIR_APP) && make -C libiscsi
72 cd $(DIR_APP)/libiscsi && python setup.py build
73endef
74
75define STAGE_INSTALL
76 -mkdir -pv $(BUILDROOT)/sbin
77 -mkdir -pv $(BUILDROOT)/usr/share/man/man8
78 -mkdir -pv $(BUILDROOT)/etc/{iscsi,sysconfig}
79 -mkdir -pv $(BUILDROOT)/etc/NetworkManager/dispatcher.d
80 -mkdir -pv $(BUILDROOT)/var/lib/iscsi/{nodes,send_targets,static,isns,slp,ifaces}
81 -mkdir -pv $(BUILDROOT)/var/lock/iscsi
82 -mkdir -pv $(BUILDROOT)/usr/lib
83 -mkdir -pv $(BUILDROOT)/usr/include
84 -mkdir -pv $(BUILDROOT)/usr/lib/python2.7/site-packages
85
86 cd $(DIR_APP) && install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart \
87 $(BUILDROOT)/sbin
88 cd $(DIR_APP) && install -p -m 644 doc/iscsiadm.8 $(BUILDROOT)/usr/share/man/man8
89 cd $(DIR_APP) && install -p -m 644 doc/iscsid.8 $(BUILDROOT)/usr/share/man/man8
90 cd $(DIR_APP) && install -p -m 644 etc/iscsid.conf $(BUILDROOT)/etc/sysconfig/iscsi
91 cd $(DIR_APP) && install -p -m 644 doc/iscsistart.8 $(BUILDROOT)/usr/share/man/man8
92 cd $(DIR_APP) && install -p -m 644 doc/iscsi-iname.8 $(BUILDROOT)/usr/share/man/man8
93
94 cd $(DIR_APP) && install -p -m 755 $(DIR_SOURCE)/04-iscsi $(BUILDROOT)/etc/NetworkManager/dispatcher.d
95
96 cd $(DIR_APP) && install -p -m 755 libiscsi/libiscsi.so.0 $(BUILDROOT)/usr/lib
97 ln -svf libiscsi.so.0 $(BUILDROOT)/usr/lib/libiscsi.so
98 cd $(DIR_APP) && install -p -m 644 libiscsi/libiscsi.h $(BUILDROOT)/usr/include
99
100 cd $(DIR_APP) && install -p -m 755 libiscsi/build/lib.linux-*/libiscsimodule.so \
101 $(BUILDROOT)/usr/lib/python2.7/site-packages
102endef