1 |
< |
### RPM external dcap 1.2.35-CMS19 |
2 |
< |
# Fakes the presence of dcap since we are not allowed to distribute it. |
3 |
< |
Source: http://service-spi.web.cern.ch/service-spi/external/tarFiles/%n-%realversion.tar.gz |
4 |
< |
Patch: http://service-spi.web.cern.ch/service-spi/external/tarFiles/%n-%realversion.patch |
1 |
> |
### RPM external dcap 1.7.0.48 |
2 |
> |
#get dcap from dcache svn repo now... |
3 |
> |
%define svnTag %(echo %realversion | tr '.' '-') |
4 |
> |
Source: svn://svn.dcache.org/dCache/tags/production-%svnTag/modules/dcap?scheme=http&module=dcap&output=/dcap.tgz |
5 |
> |
Patch0: dcap-macosx-workarounds |
6 |
> |
|
7 |
> |
%define isosx %(case %cmsos in osx*%closingbrace echo true;; *%closingbrace echo false;; esac) |
8 |
|
%define cpu %(echo %cmsplatf | cut -d_ -f2) |
9 |
< |
%if "%cpu" != "amd64" |
9 |
> |
|
10 |
> |
# Determine the soname and the suffix for the libraries. |
11 |
> |
# We do it this way because rpm does not support nested |
12 |
> |
# ifs. |
13 |
> |
%if "%{?isosx:set}-%{cpu}" == "set-amd64" |
14 |
> |
%define soname dylib |
15 |
|
%define libsuffix %{nil} |
16 |
< |
%else |
16 |
> |
%endif |
17 |
> |
|
18 |
> |
%if "%{?isosx:set}-%{cpu}" == "set-ia32" |
19 |
> |
%define soname dylib |
20 |
> |
%define libsuffix %{nil} |
21 |
> |
%endif |
22 |
> |
|
23 |
> |
%if "%{?isosx:set}-${cpu}" == "-amd64" |
24 |
> |
%define soname so |
25 |
|
%define libsuffix ()(64bit) |
26 |
|
%endif |
27 |
|
|
28 |
< |
Provides: libdcap.so%{libsuffix} |
29 |
< |
Provides: libpdcap.so%{libsuffix} |
28 |
> |
%if "%{?isosx:set}-${cpu}" == "-ia32" |
29 |
> |
%define soname so |
30 |
> |
%define libsuffix %{nil} |
31 |
> |
%endif |
32 |
> |
|
33 |
> |
Provides: libdcap.%{soname}%{libsuffix} |
34 |
> |
Provides: libpdcap.%{soname}%{libsuffix} |
35 |
> |
|
36 |
|
%prep |
37 |
< |
rm -rf %n-%realversion |
38 |
< |
%setup -n %n-%realversion |
37 |
> |
%setup -n dcap |
38 |
> |
# THIS PATCH IS COMPLETELY UNTESTED AND HAS THE SOLE |
39 |
> |
# PURPOSE OF BUILDING STUFF ON MAC, REGARDLESS WHETHER |
40 |
> |
# IT WORKS OR NOT. |
41 |
> |
case %cmsos in |
42 |
> |
osx*) |
43 |
|
%patch0 -p1 |
44 |
+ |
;; |
45 |
+ |
esac |
46 |
+ |
|
47 |
|
%build |
48 |
< |
rm -rf %i |
49 |
< |
mkdir -p %i |
50 |
< |
LD=gcc make BIN_PATH=%i %makeprocesses |
48 |
> |
chmod +x mkmapfile.sh |
49 |
> |
chmod +x mkdirs.sh |
50 |
> |
chmod +x version.sh |
51 |
> |
LD=gcc make BIN_PATH=%i SONAME=%soname %makeprocesses |
52 |
|
%install |
53 |
< |
LD=gcc make BIN_PATH=%i install |
24 |
< |
|
25 |
< |
# SCRAM ToolBox toolfile |
26 |
< |
mkdir -p %i/etc/scram.d |
27 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
28 |
< |
<doc type=BuildSystem::ToolDoc version=1.0> |
29 |
< |
<Tool name=%n version=%v> |
30 |
< |
<lib name=dcap> |
31 |
< |
<Client> |
32 |
< |
<Environment name=DCAP_BASE default="%i"></Environment> |
33 |
< |
<Environment name=LIBDIR default="$DCAP_BASE/lib"></Environment> |
34 |
< |
<Environment name=INCLUDE default="$DCAP_BASE/include"></Environment> |
35 |
< |
</Client> |
36 |
< |
</Tool> |
37 |
< |
EOF_TOOLFILE |
38 |
< |
|
39 |
< |
%post |
40 |
< |
%{relocateConfig}etc/scram.d/%n |
53 |
> |
LD=gcc make BIN_PATH=%i SONAME=%soname install |