[PATCH] Add RPM spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based on Mike Christie's spec file for the Red Hat scsi-target-utils
package.
---
 tgt.spec |  114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 114 insertions(+), 0 deletions(-)
 create mode 100644 tgt.spec

diff --git a/tgt.spec b/tgt.spec
new file mode 100644
index 0000000..33bd581
--- /dev/null
+++ b/tgt.spec
@@ -0,0 +1,114 @@
+Name:           tgt
+Version:        0.9.8
+Release:        1
+Summary:        The SCSI target daemon and utility programs
+
+Group:          System Environment/Daemons
+License:        GPLv2
+URL:            http://stgt.berlios.de
+Source0:        http://stgt.berlios.de/releases/tgt-%{version}.tar.bz2
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  openssl-devel pkgconfig libibverbs-devel librdmacm-devel
+Requires:       /sbin/chkconfig  /sbin/service
+ExcludeArch:	s390 s390x
+
+%description
+The SCSI target package contains the daemon and tools to setup a SCSI targets.
+Currently, software iSCSI targets are supported.
+
+%prep
+%setup -q -n tgt-%{version}
+
+%build
+if pkg-config openssl ; then
+        CPPFLAGS=$(pkg-config --cflags openssl) ; export CPPFLAGS
+        LDFLAGS=$(pkg-config --libs openssl) ; export LDFLAGS
+fi
+pushd usr
+%{__sed} -i -e 's|-Wall -g -O2|%{optflags}|' Makefile
+%{__make} %{?_smp_mflags} ISCSI=1 ISCSI_RDMA=1
+
+%install
+%{__rm} -rf %{buildroot}
+%{__install} -d %{buildroot}%{_sbindir}
+%{__install} -d %{buildroot}%{_mandir}/man8
+%{__install} -d %{buildroot}%{_initrddir}
+%{__install} -d %{buildroot}/etc/tgt
+%{__install} -d %{buildroot}/etc/sysconfig
+
+%{__install} -p -m 0755 scripts/tgt-admin %{buildroot}%{_sbindir}
+%{__install} -p -m 0755 scripts/tgt-setup-lun %{buildroot}%{_sbindir}
+%{__install} -p -m 0755 scripts/tgtd.init %{buildroot}%{_initrddir}/tgtd
+%{__install} -p -m 0644 doc/manpages/tgtadm.8 %{buildroot}/%{_mandir}/man8
+%{__install} -p -m 0644 doc/manpages/tgt-admin.8 %{buildroot}/%{_mandir}/man8
+%{__install} -p -m 0644 doc/manpages/tgt-setup-lun.8 %{buildroot}/%{_mandir}/man8
+%{__install} -p -m 0600 conf/sysconfig.tgtd %{buildroot}/etc/sysconfig/tgtd
+%{__install} -p -m 0600 conf/targets.conf %{buildroot}/etc/tgt
+
+pushd usr
+%{__make} install DESTDIR=%{buildroot}
+
+%post
+/sbin/chkconfig --add tgtd
+
+%postun
+if [ "$1" = "1" ] ; then
+     /sbin/service tgtd condrestart > /dev/null 2>&1
+fi
+
+%preun
+if [ "$1" = "0" ] ; then
+     /sbin/chkconfig tgtd stop > /dev/null 2>&1
+     /sbin/chkconfig --del tgtd
+fi
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%doc doc/TODO doc/README.fcoe doc/README.ibmvstgt doc/README.iscsi doc/README.iser doc/README.lu_configuration doc/README.mmc doc/targets.conf.example doc/tmf.txt
+%{_sbindir}/tgtd
+%{_sbindir}/tgtadm
+%{_sbindir}/tgtimg
+%{_sbindir}/tgt-admin
+%{_sbindir}/tgt-setup-lun
+%{_docdir}/%{name}/*
+%{_mandir}/man8/*
+%{_initrddir}/tgtd
+%attr(0600,root,root) %config(noreplace) /etc/sysconfig/tgtd
+%attr(0600,root,root) %config(noreplace) /etc/tgt/targets.conf
+
+%changelog
+* Tue Sep 8 2009 Florian Haas <florian.haas@xxxxxxxxxx> - 0.9.8-1
+- Add spec file, sysconfig file, and init script originally only found
+  in Red Hat packages.
+
+* Mon Aug 4 2008 Mike Christie <mchristie@xxxxxxxxxx> - 0.0-5.20080917snap
+- Rebase to latest upstream snapshot to include tgt-admin and static config.
+- When doing a "tgtd stop" kill running targets if run level indicates
+system is shutting down or restarting.
+
+* Sun Feb 10 2008 Terje Rosten <terje.rosten@xxxxxxx> - 0.0-4.20071227snap
+- update to 20071227 snapshot
+- add patch to compile with newer glibc
+
+* Sat Feb  9 2008 Terje Rosten <terje.rosten@xxxxxxx> - 0.0-3.20070803snap
+- rebuild
+
+* Sun Dec 07 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> - 0.0-2.20070803snap
+- Rebuild for new openssl soname bump
+
+* Wed Sep 26 2007 Terje Rosten <terje.rosten@xxxxxxx> - 0.0-1.20070803snap
+- random cleanup
+
+* Wed Sep 26 2007 Terje Rosten <terje.rosten@xxxxxxx> - 0.0-0.20070803snap
+- update to 20070803
+- fix license tag
+- use date macro
+- build with correct flags (%%optflags)
+
+* Tue Jul 10 2007 Mike Christie <mchristie@xxxxxxxxxx> - 0.0-0.20070620snap
+- first build
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux