1
|
1 |
#
|
|
2 |
# spec file for package CBEenv
|
|
3 |
#
|
|
4 |
# Copyright 2008 Sun Microsystems, Inc.
|
|
5 |
# This file and all modifications and additions to the pristine
|
|
6 |
# package are under the same license as the package itself.
|
|
7 |
#
|
|
8 |
|
|
9 |
%include CBE.inc
|
|
10 |
|
|
11 |
Name: CBEenv
|
10
|
12 |
Version: %{?cbe_version}%{?!cbe_version:0.0}
|
1
|
13 |
Vendor: Sun Microsystems, Inc.
|
7
|
14 |
Summary: Desktop CBE: env setup scripts for the Desktop CBE
|
1
|
15 |
Source: env.sh
|
|
16 |
Source1: env.csh
|
29
|
17 |
Source2: env_include.sh
|
|
18 |
Source3: ld-wrapper
|
|
19 |
Source4: gendiff
|
1
|
20 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
21 |
SUNW_BaseDir: %{_prefix}
|
7
|
22 |
SUNW_Category: CBE,KDE,JDS,application
|
1
|
23 |
%include default-depend.inc
|
|
24 |
|
|
25 |
%prep
|
|
26 |
mkdir -p %name-%version
|
|
27 |
|
10
|
28 |
%define relroot %(echo %{_bindir} | sed -e 's,[^/][^/]*,..,g' | cut -c2-)
|
|
29 |
|
1
|
30 |
%install
|
|
31 |
rm -rf $RPM_BUILD_ROOT
|
|
32 |
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
33 |
cp %SOURCE0 $RPM_BUILD_ROOT%{_bindir}
|
|
34 |
cp %SOURCE1 $RPM_BUILD_ROOT%{_bindir}
|
|
35 |
cp %SOURCE2 $RPM_BUILD_ROOT%{_bindir}
|
29
|
36 |
cp %SOURCE3 $RPM_BUILD_ROOT%{_bindir}
|
|
37 |
cp %SOURCE4 $RPM_BUILD_ROOT%{_bindir}
|
1
|
38 |
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
|
11
|
39 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/cbe-env
|
1
|
40 |
|
10
|
41 |
%if %(pkginfo -q CBEautomake && echo 0 || echo 1)
|
|
42 |
# create the "automake" symlink to automake 1.10 when using the
|
|
43 |
# Solaris default automake, because it only includes versioned
|
|
44 |
# entries in /usr/bin
|
|
45 |
test -f %{?altroot}/usr/bin/automake-1.10 && {
|
|
46 |
cd $RPM_BUILD_ROOT%{_bindir}
|
|
47 |
ln -s %relroot/usr/bin/automake-1.10 automake
|
|
48 |
} || {
|
|
49 |
echo 'automake-1.10 not found'
|
|
50 |
exit 1
|
|
51 |
}
|
|
52 |
test -f %{?altroot}/usr/bin/aclocal-1.10 && {
|
|
53 |
cd $RPM_BUILD_ROOT%{_bindir}
|
|
54 |
ln -s %relroot/usr/bin/aclocal-1.10 aclocal
|
|
55 |
} || {
|
|
56 |
echo 'aclocal-1.10 not found'
|
|
57 |
exit 1
|
|
58 |
}
|
|
59 |
%endif
|
|
60 |
|
|
61 |
%if %(pkginfo -q CBEmake && echo 0 || echo 1)
|
|
62 |
# create the "make" symlink to gmake when using SUNWgmake
|
|
63 |
GMAKE=xx
|
|
64 |
for f in /usr/gnu/bin/make /usr/bin/gmake /usr/sfw/bin/gmake; do
|
27
|
65 |
test -f %{?altroot}$f && {
|
|
66 |
GMAKE=$f
|
|
67 |
break
|
|
68 |
}
|
10
|
69 |
done
|
|
70 |
if [ "x$GMAKE" == xxx ]; then
|
|
71 |
echo 'GNU make not found, please install SUNWgmake or CBEmake'
|
|
72 |
exit 1
|
|
73 |
fi
|
|
74 |
cd $RPM_BUILD_ROOT%{_bindir}
|
|
75 |
ln -s %relroot$GMAKE make
|
|
76 |
%endif
|
|
77 |
|
13
|
78 |
%if %(pkginfo -q CBEcoreutils && echo 0 || echo 1)
|
|
79 |
# create the "install" symlink to ginstall when using SUNWgnu-coreutils
|
|
80 |
cd $RPM_BUILD_ROOT%{_bindir}
|
27
|
81 |
# break if ginstall is not found
|
|
82 |
test -x /usr/bin/ginstall
|
13
|
83 |
ln -s %relroot/usr/bin/ginstall install
|
|
84 |
%endif
|
|
85 |
|
18
|
86 |
%if %(pkginfo -q CBEdiff && echo 0 || echo 1)
|
|
87 |
# create the "diff" symlink to gdiff when using SUNWgnu-diffutils
|
|
88 |
cd $RPM_BUILD_ROOT%{_bindir}
|
27
|
89 |
# break if gdiff is not found
|
|
90 |
test -x /usr/bin/gdiff
|
18
|
91 |
ln -s %relroot/usr/bin/gdiff diff
|
|
92 |
%endif
|
|
93 |
|
27
|
94 |
%if %(pkginfo -q CBEm4 && echo 0 || echo 1)
|
|
95 |
# create the "m4" symlink to gm4 when using SUNWgm4
|
|
96 |
GM4=xx
|
|
97 |
for f in /usr/gnu/bin/m4 /usr/bin/gm4 /usr/sfw/bin/gm4; do
|
|
98 |
test -f %{?altroot}$f && {
|
|
99 |
GM4=$f
|
|
100 |
break
|
|
101 |
}
|
|
102 |
done
|
|
103 |
if [ "x$GM4" == xxx ]; then
|
|
104 |
echo 'GNU m4 not found, please install SUNWgm4 or CBEm4'
|
|
105 |
exit 1
|
|
106 |
fi
|
|
107 |
cd $RPM_BUILD_ROOT%{_bindir}
|
|
108 |
ln -s %relroot$GM4 m4
|
|
109 |
%endif
|
13
|
110 |
|
1
|
111 |
%clean
|
|
112 |
rm -rf $RPM_BUILD_ROOT
|
|
113 |
|
11
|
114 |
%preun
|
|
115 |
rm -f $BASEDIR/lib/cbe-env/*
|
|
116 |
|
1
|
117 |
%files
|
|
118 |
%defattr(-, root, bin)
|
|
119 |
%dir %attr (0755, root, bin) %{_bindir}
|
|
120 |
%{_bindir}/*
|
11
|
121 |
%dir %attr (0755, %build_user, other) %{_libdir}/cbe-env
|
1
|
122 |
|
|
123 |
%changelog
|
29
|
124 |
* Thu Jun 26 2008 - [email protected]
|
|
125 |
- add env_include.sh
|
17
|
126 |
* Mon Jun 16 2008 <[email protected]>
|
|
127 |
- move gendiff here from CBEdiff.spec
|
11
|
128 |
* Thu Jun 12 2008 <[email protected]>
|
|
129 |
- add cbe-env dir and preun script for deleting the env files
|
10
|
130 |
* Wed Jun 11 2008 <[email protected]>
|
|
131 |
- update version, create symlinks for [Open]Solaris gnu make, automake, aclocal
|
1
|
132 |
* Mon Apr 14 2008 - [email protected]
|
|
133 |
- update deps
|
|
134 |
- use CBE.inc
|
|
135 |
* Fri Oct 14 2005 <[email protected]>
|
|
136 |
- add ld-wrapper
|
|
137 |
* Mon Sep 06 2004 <[email protected]>
|
|
138 |
- update version, fix Summary
|
|
139 |
* Mon May 24 2004 <[email protected]>
|
|
140 |
- initial version
|