cta.spec.in 2.28 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Generic macros
#---------------
%define name cta
%define ctaVersion @CTA_VERSION@
%define ctaRelease @CTA_RELEASE@

# Neutral packaging (for srpm)
#-----------------------------
%if 0%{?neutralpackage:1} > 0
%define mydist %{nil}
%else
%define mydist %{?dist}
%endif

# Skipping unit tests (for developpers)
#--------------------------------------
%define skip_unit_tests @SKIP_UNIT_TESTS@

# General settings
#-----------------
Summary: CERN Tape Archive
Name: %{name}
Version: %{ctaVersion}
Release: %{ctaRelease}%{mydist}
Source: %{name}-%{ctaVersion}-%{ctaRelease}.tar.gz
License: http://cern.ch/castor/DIST/CONDITIONS
Group: Application/cta
BuildRoot: %{_builddir}/%{name}-%{version}-root
BuildRequires: cmake >= 2.6 redhat-rpm-config
# only build debug info if you're building the whole code

%description
The CTA project is the CERN Tape Archive system.

%prep
%setup -q -n %{name}-%{ctaVersion}-%{ctaRelease}

%build

mkdir -p build
cd build
# The cmake step does the selection between client/server compilation or just client
cmake .. -DCOMPILE_PACKAGING:STRING=0
%{__make} -s %{_smp_mflags}

%install
# define castor version (modified by maketar.sh to put the exact version)
%{__rm} -rf ${RPM_BUILD_ROOT}

cd build
%{__make} install DESTDIR=${RPM_BUILD_ROOT} EXPORTMAN=${RPM_BUILD_ROOT}/usr/share/man

%clean
%{__rm} -rf $RPM_BUILD_ROOT
%{__rm} -rf $RPM_BUILD_DIR/%{name}-%{version}


%check
%if "%{skip_unit_tests}" == "0"
cd build
%{__make} test
%endif

# The packages will be cta-tapeserver, cta-frontend, cta-cli

%package -n cta-tapeserver
Summary: CERN Tape Archive
Group: Application/CTA
%description -n cta-tapeserver
CERN Tape Archive:
The tape server daemon
%files -n cta-tapeserver
%defattr(-,root,root)
74
%attr(0755,root,root) %{_bindir}/tapeserverd
75

76
77
78
79
80
81
82
83
84
85
%package -n cta-frontend
Summary: CERN Tape Archive
Group: Application/CTA
%description -n cta-frontend
CERN Tape Archive:
The xroot plugin
%files -n cta-frontend
%defattr(-,root,root)
%attr(0755,root,root) %{_libdir}/libXrdCtaOfs.so
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/xrd.cf.cta
86

87
88
89
90
91
92
93
94
95
96
%package -n cta-cli
Summary: CERN Tape Archive
Group: Application/CTA
%description -n cta-cli
CERN Tape Archive:
The xroot plugin
%files -n cta-cli
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/cta
%attr(0755,root,root) %{_bindir}/ctaAddAdminUser