forked from gdraheim/pfe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpfe.spec
166 lines (145 loc) · 4.75 KB
/
pfe.spec
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
%{!?dist: %{?suse_version: %define dist suse}}
%define variant forth
Summary: Portable Forth Environment
Name: pfe
Version: 0.33.71
Release: 1%{dist}
License: LGPL
Group: Development/Languages
URL: http://sourceforge.net/projects/pfe
Vendor: Guido U. Draheim <[email protected]>
Source0: http://prdownloads.sf.net/%{name}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{variant}-%{version}-%{release}
Packager: Guido U. Draheim <[email protected]>
BuildRequires: ncurses-devel
BuildRequires: pkg-config
%package %{variant}
Summary: PFE Forth
Group: Development/Languages
Provides: pfe
%package docs
Summary: PFE Documentation
Group: Development/Libraries
Provides: pfe-doc
BuildRequires: python
BuildRequires: xmlto
%package %{variant}-devel
Summary: PFE Development Headers
Group: Development/Libraries
Requires: pfe-%{variant}
Provides: pfe-devel
# newest opensuse ships with texlive that depends on zziplib
%if 0%{opensuse_bs}
BuildRequires: zziplib
%endif
%description
The Portable Forth Environment is a Forth Engine completly written in C.
It has a module concept so it can be extended with C modules. It is
completly multithreaded, and implements the DPANS94, the proposed ANSI
standard on Forth.
Available rpmbuild rebuild options:
--with : regs fast call sbr modules testmodule
%description %{variant}
The Portable Forth Environment is a Forth Engine completly written in C.
Its modules implement the DPANS94, the proposed ANSI standard on Forth.
%description docs
The Portable Forth Environment.
The documentation, mostly autogenerated. (as for http://PFE.sf.net)
%description %{variant}-devel
The Portable Forth Environment.
The header file for compiling extension modules for
use by the forth engine, or for compiling applications
that use the forth library as a scripting engine.
The headers are namespace clean, i.e. all symbols
have a prefix to distinguish them from other symbols.
%prep
%setup
# % configure - the configure macro has weird interactions with pfe builds
export pfemoduleslibdir=%{_libdir}
CFLAGS="$RPM_OPT_FLAGS" sh configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
%{?_with_call: %{!?_with_sbr: --with-call-threading}} \
%{?_with_call: %{?_with_sbr: --with-sbr-call-threading}} \
%{!?_with_call: %{?_with_sbr: --with-sbr-threading}} \
%{?_with_regs: --with-regs=all} \
%{?_with_fast: --with-static-regs} \
%{?_without_modules: --without-modules} \
%{?_without_testmodule: --without-testmodule}
%build
export SHOWBADTESTOUT=y
make
make check
make mans
make docs
%install
rm -rf %{buildroot}
mkdir %{buildroot}
make install DESTDIR=%{buildroot}
make install-mans DESTDIR=%{buildroot}
make install-docs DESTDIR=%{buildroot}
rm %{buildroot}%{_bindir}/pfe-exec
rm %{buildroot}%{_bindir}/pfe
rmdir %{buildroot}%{_infodir}
echo ==========================
cat %buildroot%_libdir/pkgconfig/*.pc
echo ==========================
%clean
rm -rf %{buildroot}
%post %{variant}
/sbin/ldconfig
for bin in pfe-exec pfe ; do
test ! -f %{_bindir}/$bin || rm %{_bindir}/$bin
for variant in forth call calls fast fastest; do
if test -f %{_bindir}/$bin-$variant
then (cd %{_bindir} && ln -s $bin-$variant $bin) ; break ; fi
done ; test -f %{_bindir}/$bin || exit $?; done
%postun %{variant}
/sbin/ldconfig
for bin in pfe-config pfe-exec pfe ; do
test ! -f %{_bindir}/$bin || rm %{_bindir}/$bin
for variant in forth call calls fast fastest; do
if test -f %{_bindir}/$bin-$variant
then (cd %{_bindir} && ln -s $bin-$variant $bin) ; break ; fi
done done
%files %{variant}
%defattr(-,root,root)
%doc ChangeLog
%{_bindir}/%{name}*
%{_libdir}/lib%{name}*.so.*
%dir %{_libdir}/%{name}-%{variant}
%{_libdir}/%{name}-%{variant}/*.so
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_mandir}/man1/*
%files docs
%defattr(-,root,root)
%dir %{_infodir}/../doc/%{name}
%{_infodir}/../doc/%{name}/*
%post docs
echo "PFE Documentation installed"
: scrollkeeper-install && /bin/true
%files %{variant}-devel
%defattr(-,root,root)
%{_bindir}/*-exec-*
%{_mandir}/man3/*
%dir %{_prefix}/include/%{name}
%{_prefix}/include/%{name}/*
%{_libdir}/lib%{name}*.so
%{_libdir}/lib%{name}*.la
%{_libdir}/lib%{name}*.a
%{_libdir}/%{name}-%{variant}/*.la
%{_libdir}/%{name}-%{variant}/*.a
%dir %{_libdir}/%{name}-%{variant}/renamed
%{_libdir}/%{name}-%{variant}/renamed/*
%{_libdir}/pkgconfig/*.pc