Files
ec-gn-ja-pcf/EC-GN-JA-PCF/unit.spec

135 lines
3.7 KiB
RPMSpec

#+======================================================================
# $HeadURL: $
# $Id: $
#
# Project : ITER I&C Integration
#
# Description : SPEC file for packaging CS-Studio related file artefacts
#
# Author(s) : Bertrand Bauvir (IO)
#
# Copyright (c) : 2010-2021 ITER Organization,
# CS 90 046
# 13067 St. Paul-lez-Durance Cedex
# France
#
# This file is part of ITER CODAC software.
# For the terms and conditions of redistribution or use of this software
# refer to the file ITER-LICENSE.TXT located in the top level directory
# of the distribution package.
#
#-======================================================================
%define __spec_install_post %{nil}
Name: iter-icint-%{project_artifactId}
Version: %{project_version}
Release: %{?rpm_release_num:%{rpm_release_num}}%{!?rpm_release_num:1}
Summary: %{project_description}
Group: Development/CODAC
Distribution: I&C Applications
#URL: http://www.iter.org/org/team/chd/cid/codac
URL: %{?rpm_vcs_url:%{rpm_vcs_url}}%{!?rpm_vcs_url:undefined}
Vendor: ITER Organization
Packager: ITER Organization
License: ITER License
Source0: src.tar.gz
BuildArch: noarch
AutoReq: no
%provides_self
%description
%{project_description}.
%package -n %subpackage opi
Summary: %{project_description} - OPI resources
Group: Development/CODAC
AutoReq: no
Requires: filesystem
%provides_self %subpackage opi
%description -n %subpackage opi
%{project_description} - OPI resources.
%package -n %subpackage alarm
Summary: %{project_description} - Alarm configuration
Group: Development/CODAC
AutoReq: no
Requires: filesystem
%provides_self %subpackage alarm
%description -n %subpackage alarm
%{project_description} - Alarm configuration.
%package -n %subpackage archive
Summary: %{project_description} - Archive configuration
Group: Development/CODAC
AutoReq: no
Requires: filesystem
%provides_self %subpackage archive
%description -n %subpackage archive
%{project_description} - Archive configuration.
%prep
%setup -T -c -a 0
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/opt/codac/opi/%{project_artifactId}
install -d %{buildroot}/opt/codac/opi/%{project_artifactId}
cp -r src/main/boy %{buildroot}/opt/codac/opi/%{project_artifactId}
mkdir -p %{buildroot}/opt/codac/opi/%{project_artifactId}/epics
cp -r src/main/epics/*App %{buildroot}/opt/codac/opi/%{project_artifactId}/epics || :
mkdir -p %{buildroot}/etc/opt/codac/%{project_artifactId}
install -d %{buildroot}/etc/opt/codac/%{project_artifactId}
cp src/main/beast/* %{buildroot}/etc/opt/codac/%{project_artifactId}
cp src/main/beauty/* %{buildroot}/etc/opt/codac/%{project_artifactId}
mkdir -p %{buildroot}/etc/opt/codac/css/beast/%{project_artifactId}
install -d %{buildroot}/etc/opt/codac/css/beast/%{project_artifactId}
cp src/main/beast/* %{buildroot}/etc/opt/codac/css/beast/%{project_artifactId}
mkdir -p %{buildroot}/etc/opt/codac/css/beauty/%{project_artifactId}
install -d %{buildroot}/etc/opt/codac/css/beauty/%{project_artifactId}
cp src/main/beauty/* %{buildroot}/etc/opt/codac/css/beauty/%{project_artifactId}
%clean
%files
%files -n %subpackage opi
/opt/codac/opi/*
%files -n %subpackage alarm
/etc/opt/codac/%{project_artifactId}/*beast.xml
/etc/opt/codac/css/beast/%{project_artifactId}/*beast.xml
%files -n %subpackage archive
/etc/opt/codac/%{project_artifactId}/*beauty.xml
/etc/opt/codac/css/beauty/%{project_artifactId}/*beauty.xml
%pretrans
%beginlog_pretrans
%endlog
%posttrans
%beginlog_posttrans
%endlog
%preun
%beginlog_preun
%endlog
%postun
%beginlog_postun
%endlog
%changelog
* Wed Mar 31 2021 Bertrand Bauvir <bertrand.bauvir@iter.org>
- Initial version.