]> git.pld-linux.org Git - packages/pl.git/blob - pl.spec
- xpce version 6.6.66 ;)
[packages/pl.git] / pl.spec
1 #
2 # TODO
3 #       - maybe separate other prolog packages to rpm subpackages
4 #
5 # Conditional build:
6 %bcond_without  java            # don't build with java bindings (So far, JPL only works with Sun Java and IBM Java)
7 #
8
9 %ifnarch %{x8664} i586 i686 pentium3 pentium4 athlon 
10 %undefine       with_java
11 %endif
12
13 %define         xpce_version 6.6.66
14 Summary:        SWI Prolog Language
15 Summary(pl.UTF-8):      Język SWI Prolog
16 Name:           pl
17 Version:        5.8.3
18 Release:        1
19 License:        LGPL/GPL
20 Group:          Development/Languages
21 Source0:        http://www.swi-prolog.org/download/stable/src/%{name}-%{version}.tar.gz
22 # Source0-md5:  faeb7ade8da9832f113e6748ba6cab03
23 Patch0:         %{name}-clib-configure.patch
24 URL:            http://www.swi-prolog.org/
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  db-devel
28 BuildRequires:  fontconfig-devel
29 BuildRequires:  freetype-devel
30 BuildRequires:  gmp-devel
31 %{?with_java:BuildRequires:     java-sun}
32 BuildRequires:  libjpeg-devel
33 BuildRequires:  ncurses-devel
34 BuildRequires:  openssl-devel
35 BuildRequires:  pkgconfig
36 BuildRequires:  readline-devel >= 4.2
37 BuildRequires:  unixODBC-devel
38 BuildRequires:  uriparser-devel
39 BuildRequires:  xorg-lib-libICE-devel
40 BuildRequires:  xorg-lib-libSM-devel
41 BuildRequires:  xorg-lib-libX11-devel
42 BuildRequires:  xorg-lib-libXaw-devel
43 BuildRequires:  xorg-lib-libXext-devel
44 BuildRequires:  xorg-lib-libXft-devel
45 BuildRequires:  xorg-lib-libXinerama-devel
46 BuildRequires:  xorg-lib-libXmu-devel
47 BuildRequires:  xorg-lib-libXpm-devel
48 BuildRequires:  xorg-lib-libXrender-devel
49 BuildRequires:  xorg-lib-libXt-devel
50 BuildRequires:  zlib-devel
51 Obsoletes:      swi-pl
52 Obsoletes:      swi-prolog
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 ISO/Edinburgh-style Prolog compiler including modules, autoload,
57 libraries, Garbage-collector, stack-expandor, C/C++-interface,
58 GNU-readline interface, very fast compiler. Including packages clib
59 (Unix process control and sockets), cpp (C++ interface), sgml (reading
60 XML/SGML), sgml/RDF (reading RDF into triples) and XPCE (Graphics UI
61 toolkit, integrated editor (Emacs-clone) and source-level debugger).
62
63 %description -l pl.UTF-8
64 Kompilator języka PROLOG w stylu Edinburgh wraz z modułami,
65 bibliotekami, garbage collectorrem, interfejsem C, interfejsami do GNU
66 readline, GNU Emacsa i X11 przy użyciu XPCE.
67
68 %package jpl
69 Summary:        Dynamic, bidirectional interface between SWI-Prolog and Java
70 Summary(pl.UTF-8):      Dynamiczny, dwukierunkowy interfejs pomiędzy SWI-Prologiem a Javą
71 Group:          Development/Languages
72 Requires:       %{name} = %{version}-%{release}
73 Requires:       java-sun
74
75 %description jpl
76 JPL 3.x is a dynamic, bidirectional interface between SWI-Prolog 5.2.0 or
77 later and Java 2 runtimes (see JPL 3.x Objectives). It offers two APIs:
78   * Java API (Java-calls-Prolog): this interface comprises public Java
79     classes which support:
80        + constructing Java representations of Prolog terms and queries
81        + calling queries within SWI-Prolog engines
82        + retrieving (as Java representations of Prolog terms) any bindings
83          created by a call
84   * Prolog API (Prolog-calls-Java): this interface comprises Prolog library
85     predicates which support:
86        + creating instances (objects) of Java classes (built-in and
87          user-defined)
88        + calling methods of Java objects (and static methods of classes),
89          perhaps returning values or object references
90        + getting and setting the values of fields of Java objects and
91          classes
92
93 Calls to the two APIs can be nested, e.g. Java code can call Prolog
94 predicates which call Java methods which call Prolog predicates etc.
95
96 %description jpl -l pl.UTF-8
97 JPL 3.x to dynamiczny, dwukierunkowy interfejs pomiędzy SWI-Prologiem
98 5.2.0 i późniejszymi a środowiskami uruchomieniowymi Javy 2 (więcej w
99 dokumencie JPL 3.x Objectives). Oferuje dwa API:
100   - API Javy (wywołania Prologu z Javy) - ten interfejs obejmuje klasy
101     publiczne Javy obsługujące:
102     - tworzenie reprezentacji wyrażeń i zapytań Prologu w Javie
103     - wywoływanie zapytań wewnątrz silników SWI-Prologu
104     - odtwarzanie (jako reprezentacji wyrażeń Prologu w Javie)
105       wszelkich dowiązań utworzonych przez wywołanie
106   - API Prologu (wywołania Javy z Prologu) - ten interfejs obejmuje
107     predykaty biblioteki Prologu obsługującą:
108     - tworzenie instancji (obiektów) klas Javy (wbudowanych i
109       zdefiniowanych przez użytkownika)
110     - wywołania metod obiektów (i statycznych metod klas) Javy, także
111       zwracających wartości lub referencje do obiektów
112     - pobieranie i ustawianie wartości pól obiektów i klas Javy
113
114 Wywołania obu API mogą być zagnieżdżane, np. kod w Javie może wywołać
115 predykaty Prologu wywołujące metody Javy, które wywołują predykaty
116 Prologu itd.
117
118 %package xpce
119 Summary:        XPCE - GUI Toolkit for (SWI-)Prolog
120 Summary(pl.UTF-8):      XPCE - toolkit graficzny dla (SWI-)Prologu
121 Group:          Development/Languages
122 Requires:       %{name} = %{version}-%{release}
123 Obsoletes:      xpce
124
125 %description xpce
126 Graphical User Interface (GUI) toolkit for Prolog and other
127 dynamically typed languages. Provides Object Oriented programming to
128 Prolog as well as a high-level portable GUI toolkit for (SWI-)Prolog.
129 Also available for Quintus and SICStus Prolog.
130
131 %description xpce -l pl.UTF-8
132 Zestaw Graficzny Interfejsu Użytkownika (GUI) dla Prologu i innych
133 dynamicznie wpisywanych języków. Udostępnia obiektowo zorientowane
134 programowanie dla Prologu jak także jako wysoko dostępny przenośny
135 zestaw GUI dla (SWI-)Prologu. Dostępne także dla Quintus i SICStus
136 Prolog.
137
138 %prep
139 %setup -q
140 %patch0 -p1
141
142 %build
143 cd src
144 cp -f /usr/share/automake/config.sub .
145 %{__aclocal}
146 %{__autoconf}
147 %configure
148 %{__make}
149 %{__make} check
150 cd ..
151
152 # the packages are written in Prolog itself
153 PATH="$(pwd)/src:$PATH"; export PATH
154 LD_LIBRARY_PATH="$(pwd)/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
155
156 cd packages
157 wd=`pwd`
158 for i in xpce/src chr clib clpqr cpp cppproxy db http inclpr %{?with_java:jpl} mp nlp odbc pldoc plunit semweb sgml sgml/RDF ssl table uri zlib; do
159         cd $i
160         cp -f /usr/share/automake/config.sub .
161         %{__aclocal}
162         %{__autoconf}
163         %{__autoheader} || :
164         %configure
165         %{__make}
166         cd $wd
167 done
168 cd ..
169
170 %install
171 rm -rf $RPM_BUILD_ROOT
172
173 %{__make} -j1 install -C src \
174         DESTDIR=$RPM_BUILD_ROOT
175
176 install -d $RPM_BUILD_ROOT%{_libdir}/pl-%{version}/doc
177
178 LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}/pl-%{version}/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
179
180 for i in xpce/src chr clib clpqr cpp cppproxy db http inclpr %{?with_java:jpl} mp nlp odbc pldoc plunit semweb sgml sgml/RDF ssl table uri zlib; do
181         PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH \
182         %{__make} -j1 install -C packages/$i \
183                 PLBASE=$RPM_BUILD_ROOT%{_libdir}/pl-%{version} \
184                 prefix=$RPM_BUILD_ROOT%{_prefix} \
185                 bindir=$RPM_BUILD_ROOT%{_bindir} \
186                 mandir=$RPM_BUILD_ROOT%{_mandir}/man1
187 done
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %files
193 %defattr(644,root,root,755)
194 %doc README* LSM ChangeLog PORTING
195 %doc dotfiles/dot*
196 %attr(755,root,root) %{_bindir}/pl*
197 %dir %{_libdir}/pl-%{version}
198 %attr(755,root,root) %{_libdir}/pl-%{version}/bin
199 %{_libdir}/pl-%{version}/boot*
200 %dir %{_libdir}/pl-%{version}/lib
201 %dir %{_libdir}/pl-%{version}/lib/*-linux
202 %attr(755,root,root) %{_libdir}/pl-%{version}/lib/*-linux/*.so*
203 %{_libdir}/pl-%{version}/lib/*-linux/*.a
204 %{_libdir}/pl-%{version}/library
205 %if %{with java}
206 %exclude %{_libdir}/pl-%{version}/lib/*-linux/libjpl.so
207 %exclude %{_libdir}/pl-%{version}/library/jpl.pl
208 %endif
209 %{_libdir}/pl-%{version}/include
210 %{_libdir}/pl-%{version}/do*
211 %{_libdir}/pl-%{version}/swipl
212 %{_libdir}/pl-%{version}/*.rc
213 %{_pkgconfigdir}/pl.pc
214 %{_mandir}/man?/pl*
215
216 %files xpce
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_bindir}/xpce*
219 %dir %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}
220 %attr(755,root,root) %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/bin
221 %attr(755,root,root) %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/lib
222 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/appl-help
223 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/bitmaps
224 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/include
225 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/man
226 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/pl
227 %{_libdir}/%{name}-%{version}/xpce-%{xpce_version}/prolog
228
229 %if %{with java}
230 %files jpl
231 %defattr(644,root,root,755)
232 %{_libdir}/pl-%{version}/lib/jpl.jar
233 %attr(755,root,root) %{_libdir}/pl-%{version}/lib/*-linux/libjpl.so
234 %{_libdir}/pl-%{version}/library/jpl.pl
235 %endif
This page took 0.050509 seconds and 4 git commands to generate.