blob: d376c8616654abf611d3f79e6afb91ee01894384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
Summary: Programs for Processing and Analysis of Astronomical Data
Name: iraf
Version: 2.16
Release: %mkrel 1
License: Freely redistributable/modifiable if attributed, no warranty
Group: Applications/Scientific
Distribution: Tim's RPM Shack
Source0: ftp://iraf.noao.edu/iraf/v216/PCIX/iraf-src.tar.gz
Source1: http://iraf.noao.edu/x11iraf/x11iraf-v2.0BETA-src.tar.gz
Patch0: iraf-build.patch
Patch1: x11iraf.stdarg.patch
Url: http://iraf.noao.edu/
Provides: iraf
BuildRequires: curl-devel
%description
IRAF stands for the Image Reduction and Analysis Facility. It
is the de facto standard for the general processing of astronomical images
and spectroscopy from the ultraviolet to the far infrared. IRAF is a
product of the National Optical Astronomy Observatories (www.noao.edu).
%prep
%setup -q -c
%patch0 -p1
chmod a+x util/mksysvos util/mksysnovos
pushd unix/hlib/libc
mkdir iraf
mv stdio.h iraf
mv ctype.h iraf
rm -f stdarg*.h setjmp.h kproto*
popd
%setup -q -T -c -a 1 -n x11-iraf
%patch1 -p1
%build
export iraf=%{_builddir}/%{name}-%{version}/
export host=unix
export hlib=%{_builddir}/%{name}-%{version}/unix/hlib/
export PATH=$PATH:${iraf}"unix/bin/"
export pkglibs=${iraf}noao/lib/,${iraf}unix/hlib/libc/,${iraf}unix/bin/
cd %{_builddir}/%{name}-%{version}
export HOST_CURL=1
export IRAFARCH=`${hlib}irafarch.csh`
rm -f ${iraf}unix/bin/*
rm -rf ${iraf}unix/bin.*/*
rm -f ${iraf}unix/bin
rm -f ${iraf}bin
ln -sf bin.${IRAFARCH} bin
pushd unix/hlib
ln -sf mach`getconf LONG_BIT`.h mach.h
ln -sf iraf`getconf LONG_BIT`.h iraf.h
popd
find -name "*.a" | xargs rm -f
make src
export NOVOS=1
pushd vendor/cfitsio
./configure
make
cp libcfitsio.a $iraf/lib
popd
pushd vendor/voclient
make mylib
cp libvo/libVO.a $iraf/lib
popd
${iraf}util/mksysnovos
unset NOVOS
pushd vendor/cfitsio
./configure
make
cp libcfitsio.a $iraf/lib
popd
export pkglibs=${iraf}noao/lib/,${iraf}unix/bin/,${iraf}unix/hlib/
pushd vendor/voclient
make clean
make mylib
cp libvo/libVO.a $iraf/lib
popd
export pkglibs=${iraf}noao/lib/,${iraf}unix/bin/,${iraf}unix/hlib/libc/
${iraf}util/mksysvos
sed -i unix/hlib/mkiraf.csh -e s!/iraf/iraf!%{_datadir}/iraf!g
cp ${iraf}unix/bin/*.a ${iraf}lib
rm pkg/utilities/nttools/xx_nttools.e
cd %{_builddir}/x11-iraf
rm ximtool/clients/x_ism.o
xmkmf
export PATH=$PATH:${iraf}"unix/bin/"
make
%install
%{__mkdir_p} %{buildroot}/%{_bindir}
cd %{_builddir}/%{name}-%{version}
%{__mkdir_p} %{buildroot}/%{_datadir}/iraf
cp -pr pkg %{buildroot}/%{_datadir}/iraf
cp -pr bin.* %{buildroot}/%{_datadir}/iraf
cp -pr unix vo util extern noao dev *.GEN %{buildroot}/%{_datadir}/iraf
cp -pr doc %{buildroot}/%{_datadir}/iraf
cp -pr lib %{buildroot}/%{_datadir}/iraf
cp -pr include %{buildroot}/%{_datadir}/iraf
cp -pr unix/hlib/mkiraf.csh %{buildroot}/%{_bindir}/mkiraf
cp -pr unix/hlib/cl.csh %{buildroot}/%{_bindir}/cl
%{__mkdir_p} %{buildroot}/%{_includedir}
cp unix/hlib/libc/iraf.h %{buildroot}/%{_includedir}
cd %{_builddir}/x11-iraf
make install
cp -pr bin/* %{buildroot}/%{_bindir}
%files
%doc %{_datadir}/iraf/doc
%{_datadir}/iraf
%{_bindir}
%{_includedir}
|