1 |
< |
### RPM external dcap 1.2.35 |
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-%v.tar.gz |
4 |
< |
Patch: http://service-spi.web.cern.ch/service-spi/external/tarFiles/%n-%v.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 |
> |
%endif |
17 |
> |
|
18 |
> |
%if "%{?isosx:set}-%{cpu}" == "set-ia32" |
19 |
> |
%define soname dylib |
20 |
|
%define libsuffix %{nil} |
21 |
< |
%else |
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 |
< |
%setup -n %n-%v |
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 |
< |
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 |
< |
make BIN_PATH=%i install |
21 |
< |
# |
53 |
> |
LD=gcc make BIN_PATH=%i SONAME=%soname install |