source: rtems/contrib/crossrpms/cygwin/i686/i686-pc-cygwin-cloog-ppl.spec @ e5e4e3fb

4.104.11
Last change on this file since e5e4e3fb was e5e4e3fb, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 4, 2010 at 4:52:38 PM

Add cloog-ppl.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6
7%ifos cygwin cygwin32 mingw mingw32
8%define _exeext .exe
9%define debug_package           %{nil}
10%define _libdir                 %{_exec_prefix}/lib
11%else
12%define _exeext %{nil}
13%endif
14
15%ifos cygwin cygwin32
16%define optflags -O3 -pipe -march=i486 -funroll-loops
17%endif
18
19%ifos mingw mingw32
20%if %{defined _mingw32_cflags}
21%define optflags %{_mingw32_cflags}
22%else
23%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
24%endif
25%endif
26
27%if "%{_build}" != "%{_host}"
28%define _host_rpmprefix %{_host}-
29%else
30%define _host_rpmprefix %{nil}
31%endif
32
33%define cloog_ppl_version 0.15.7-1
34%define cloog_ppl_rpmvers %{expand:%(echo 0.15.7-1 | tr - _)}
35
36Name:         i686-pc-cygwin-cloog-ppl
37Release:      0.20100204.0%{?dist}
38License:      GPL
39Group:        Development/Tools
40
41BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
42BuildArch:      noarch
43
44Version:        %cloog_ppl_rpmvers
45Summary:        Cygwin cloog-ppl Libraries
46
47Source0:        ftp://cygwin.com/pub/cygwin/release/cloog-ppl/cloog-ppl-%{cloog_ppl_version}.tar.bz2
48Source1:        ftp://cygwin.com/pub/cygwin/release/cloog-ppl/libcloog0/libcloog0-%{cloog_ppl_version}.tar.bz2
49Source2:        ftp://cygwin.com/pub/cygwin/release/cloog-ppl/libcloog-devel/libcloog-devel-%{cloog_ppl_version}.tar.bz2
50
51Provides:       i686-pc-cygwin-cloog-ppl = %{version}-%{release}
52Provides:       i686-pc-cygwin-cloog-ppl-devel = %{version}-%{release}
53
54%description
55Cygwin cloog-ppl libraries.
56
57%prep
58%setup -c -q
59
60%build
61  rm -rf i686-pc-cygwin
62
63  # Setup sys-root (Usable for gcc >= 3.4)
64  mkdir -p i686-pc-cygwin/sys-root
65  ( cd i686-pc-cygwin/sys-root ; %{__tar} xvjf %{SOURCE0})
66  ( cd i686-pc-cygwin/sys-root ; %{__tar} xvjf %{SOURCE1})
67  ( cd i686-pc-cygwin/sys-root ; %{__tar} xvjf %{SOURCE2})
68
69%install
70  rm -rf $RPM_BUILD_ROOT
71  mkdir -p $RPM_BUILD_ROOT%{_prefix}
72  cp -a i686-pc-cygwin $RPM_BUILD_ROOT%{_prefix}
73
74# Extract %%__os_install_post into os_install_post~
75cat << \EOF > os_install_post~
76%__os_install_post
77EOF
78
79# Generate customized brp-*scripts
80cat os_install_post~ | while read a x y; do
81case $a in
82# Prevent brp-strip* from trying to handle foreign binaries
83*/brp-strip*)
84  b=$(basename $a)
85  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
86  chmod a+x $b
87  ;;
88esac
89done
90
91sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
92< os_install_post~ > os_install_post
93%define __os_install_post . ./os_install_post
94
95
96cat << EOF > %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-provides
97#!/bin/sh
98grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \
99  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i686-pc-cygwin/'} | %__find_provides
100EOF
101chmod +x %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-provides
102%define __find_provides %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-provides
103
104cat << EOF > %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-requires
105#!/bin/sh
106grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \
107  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i686-pc-cygwin/'} | %__find_requires
108EOF
109chmod +x %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-requires
110%define __find_requires %{_builddir}/%{name}-%{cloog_ppl_rpmvers}/find-requires
111
112%ifnarch noarch
113# Extract %%__debug_install_post into debug_install_post~
114cat << \EOF > debug_install_post~
115%__debug_install_post
116EOF
117
118# Generate customized debug_install_post script
119cat debug_install_post~ | while read a x y; do
120case $a in
121# Prevent find-debuginfo.sh* from trying to handle foreign binaries
122*/find-debuginfo.sh)
123  b=$(basename $a)
124  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
125  chmod a+x $b
126  ;;
127esac
128done
129
130sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
131< debug_install_post~ > debug_install_post
132%define __debug_install_post . ./debug_install_post
133
134%endif
135
136%clean
137  rm -rf $RPM_BUILD_ROOT
138
139%files
140%defattr(-,root,root,-)
141%dir %{_prefix}/i686-pc-cygwin
142%{_prefix}/i686-pc-cygwin/sys-root
143
144
Note: See TracBrowser for help on using the repository browser.