2007-04-11 04:44:39 +02:00
|
|
|
#
|
2012-06-04 14:42:41 +02:00
|
|
|
# spec file for package tgt
|
2007-04-11 04:44:39 +02:00
|
|
|
#
|
2015-06-26 17:55:34 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-04-11 04:44:39 +02:00
|
|
|
#
|
2008-08-08 17:24:37 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-08-08 17:24:37 +02:00
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
Name: tgt
|
2015-09-20 10:02:13 +02:00
|
|
|
Version: 1.0.60
|
2012-06-04 14:42:41 +02:00
|
|
|
Release: 0
|
2007-04-11 04:44:39 +02:00
|
|
|
Summary: Generic Linux target framework (tgt)
|
2012-07-10 10:53:09 +02:00
|
|
|
License: GPL-2.0
|
2012-06-04 14:42:41 +02:00
|
|
|
Group: System/Daemons
|
2015-09-20 10:02:13 +02:00
|
|
|
Url: http://stgt.sourceforge.net/
|
|
|
|
Source: https://github.com/fujita/tgt/archive/v%{version}.tar.gz
|
2013-11-05 12:15:58 +01:00
|
|
|
Source1: %{name}d.service
|
2007-04-11 04:44:39 +02:00
|
|
|
Source3: %{name}.services
|
2015-09-10 17:35:31 +02:00
|
|
|
Source4: sysconfig.%{name}
|
2012-10-26 15:09:51 +02:00
|
|
|
Patch2: %{name}-fix-build
|
2014-03-03 09:59:03 +01:00
|
|
|
Patch3: setup-tgt-conf-d.patch
|
2015-11-16 22:52:21 +01:00
|
|
|
Patch4: %{name}-handle-access-of-a-target-that-has-been-removed
|
|
|
|
Patch5: %{name}-missing-module-directory-not-an-error
|
2015-09-20 10:02:13 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: libaio-devel
|
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: perl-Config-General
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
Requires: perl-Config-General
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Obsoletes: iscsitarget
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Linux target framework (tgt) aims to simplify various SCSI target
|
|
|
|
driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
|
|
|
|
|
|
|
|
Tgt consists of kernel modules, user-space daemon, and user-space
|
|
|
|
tools. Some target drivers uses all of them and some use only
|
|
|
|
user-space daemon and tools (i.e. they completely runs in user space).
|
|
|
|
|
|
|
|
%prep
|
2015-09-20 10:02:13 +02:00
|
|
|
%setup -q
|
2012-10-26 15:09:51 +02:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2015-11-16 22:52:21 +01:00
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%build
|
2014-09-03 01:33:33 +02:00
|
|
|
%ifarch ppc ppc64 ppc64le
|
2008-08-08 17:24:37 +02:00
|
|
|
%define backends ISCSI=1 FCP=1 FCOE=1 IBMVIO=1
|
2007-04-11 04:44:39 +02:00
|
|
|
%else
|
2015-09-20 10:02:13 +02:00
|
|
|
%define backends ISCSI=1 FCP=1 FCOE=1
|
2007-04-11 04:44:39 +02:00
|
|
|
%endif
|
2015-09-20 10:02:13 +02:00
|
|
|
make OPTFLAGS="%{optflags}" %{backends}
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%install
|
2015-09-20 10:02:13 +02:00
|
|
|
make DESTDIR=%{buildroot} docdir=%{_docdir}/%{name} install
|
|
|
|
install -vD -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}d.service
|
|
|
|
install -vD %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/tgt
|
|
|
|
install -vD %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
2015-09-17 22:17:32 +02:00
|
|
|
ln -sf service %{buildroot}/%{_sbindir}/rc%{name}d
|
2007-04-11 04:44:39 +02:00
|
|
|
|
2014-05-19 20:32:02 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}d.service
|
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
%post
|
2015-09-20 10:02:13 +02:00
|
|
|
%fillup_only
|
2013-11-05 12:15:58 +01:00
|
|
|
%service_add_post %{name}d.service
|
2007-04-11 04:44:39 +02:00
|
|
|
|
2008-08-08 17:24:37 +02:00
|
|
|
%preun
|
2013-11-05 12:15:58 +01:00
|
|
|
%service_del_preun %{name}d.service
|
2008-08-08 17:24:37 +02:00
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
%postun
|
2013-11-05 12:15:58 +01:00
|
|
|
%service_del_postun %{name}d.service
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2013-11-05 12:15:58 +01:00
|
|
|
%{_sbindir}/*
|
2015-09-20 10:02:13 +02:00
|
|
|
%dir %{_sysconfdir}/tgt
|
|
|
|
%dir %{_sysconfdir}/tgt/conf.d
|
|
|
|
%config %attr(0644,root,root) %{_sysconfdir}/tgt/targets.conf
|
|
|
|
%config %attr(0644,root,root) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/tgt
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.tgt
|
2013-11-05 12:15:58 +01:00
|
|
|
%{_unitdir}/%{name}d.service
|
2012-06-04 14:42:41 +02:00
|
|
|
%doc README doc/README.iscsi doc/README.iser doc/README.lu_configuration
|
|
|
|
%doc doc/README.mmc doc/README.passthrough doc/README.sbcjukebox doc/README.ssc
|
2015-09-20 10:02:13 +02:00
|
|
|
%{_mandir}/man8/*
|
2007-04-11 04:44:39 +02:00
|
|
|
|
2015-11-16 22:52:21 +01:00
|
|
|
%changelog
|