Updated .hgignore file.
[fedora-mingw.git] / darwinx-odcctools / darwinx-odcctools.spec
1 # Note about the source for these tools:
2 #
3 # Apple distributes a set of tools called cctools under the APSL2.0
4 # license.  You can get it from
5 # http://www.opensource.apple.com/darwinsource/Current/
6 # but you will need an Apple ID (although it's still open source).
7 #
8 # These are the OpenDarwin odcctools, which are an enhanced version of
9 # an older version of these tools.  However OpenDarwin and odcctools
10 # appears to be dead, replaced first by DarwinPorts, but even that
11 # hasn't seen a release for more than 2 years.
12 #
13 # Nevertheless, this is odcctools, until I can work out what is the
14 # right upstream we should be using.
15 #
16 # The version number is based on the original cctools from which this
17 # odcctools was derived.
18
19 %define odcc_version 590.36
20 %define odcc_stamp 20060413
21
22 Name:           darwinx-odcctools
23 Version:        %{odcc_version}
24 Release:        0.%{odcc_stamp}.4%{?dist}
25 Summary:        Darwin (Mac OS X) cross-compiler tools
26
27 License:        APSL 2.0
28 Group:          Development/Libraries
29
30 URL:            http://odcctools.darwinports.com/
31 Source0:        odcctools-%{odcc_stamp}.tar.bz2
32
33 Patch1:         odcctools-headers.patch
34 Patch2:         odcctools-lp64.patch
35 Patch3:         odcctools-x86-64.patch
36 Patch4:         odcctools-ofile.patch
37
38 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
39
40 BuildRequires:  darwinx-filesystem >= 1
41
42 BuildRequires:  elfutils, kernel-headers, libstdc++-devel
43
44 Requires:       darwinx-filesystem >= 1
45
46
47 %description
48 The odcctools project is geared towards improving the Darwin
49 cctools build system and code base to support Darwin development.
50
51
52 %prep
53 %setup -q -n odcctools-%{odcc_stamp}
54 %patch1 -p1
55 %patch2 -p1
56 %patch3 -p1
57 %patch4 -p1
58
59
60 %build
61 for arch in powerpc i386; do
62   mkdir build-$arch
63   pushd build-$arch
64
65   ../configure \
66     --target=$arch-apple-darwin8 \
67     --prefix=%{_prefix} \
68     --libdir=%{_libdir} \
69     --datadir=%{_datadir} \
70     --mandir=%{_mandir} \
71     --libexecdir=%{_libexecdir}
72
73   make %{?_smp_mflags}
74
75   popd
76 done
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 for arch in powerpc i386; do
82   make -C build-$arch DESTDIR=$RPM_BUILD_ROOT install
83 done
84
85 # Rename the manual pages so they don't conflict with the
86 # ones for the native tools.
87 for f in $RPM_BUILD_ROOT%{_mandir}/*/*; do
88   d=$(dirname $f); b=$(basename $f)
89   mv $f $d/i386-apple-darwin8-$b
90   ln $d/i386-apple-darwin8-$b $d/powerpc-apple-darwin8-$b
91 done
92
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97
98 %files
99 %defattr(-,root,root)
100 %doc APPLE_LICENSE
101 %{_bindir}/i386-apple-darwin8-*
102 %{_bindir}/powerpc-apple-darwin8-*
103 %{_includedir}/mach-o/
104 %{_libexecdir}/as/
105 %{_libdir}/libmacho.a
106 %{_mandir}/man1/i386-apple-darwin8-*.1*
107 %{_mandir}/man1/powerpc-apple-darwin8-*.1*
108 %{_mandir}/man3/i386-apple-darwin8-*.3*
109 %{_mandir}/man3/powerpc-apple-darwin8-*.3*
110 %{_mandir}/man5/i386-apple-darwin8-*.5*
111 %{_mandir}/man5/powerpc-apple-darwin8-*.5*
112
113
114 %changelog
115 * Sun Feb  8 2009 Richard W.M. Jones <rjones@redhat.com> - 590.36-0.20060413.4
116 - Initial RPM release for Fedora.
117
118 * Tue Mar 28 2006 Benjamin Reed <rangerrick@befunk.com> - 590.36-1
119 - fixed build to just use srcdir != builddir, changed to 10.3/10.4-specific
120
121 * Sun Feb 26 2006 Benjamin Reed <rangerrick@befunk.com> - 590.23.2od12-1
122 - initial release