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