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