]> git.pld-linux.org Git - packages/ocaml-net.git/blob - ocaml-net.spec
- orphaned, outdated
[packages/ocaml-net.git] / ocaml-net.spec
1 # TODO:
2 # - nethttpd needs to be packaged
3 #
4 %define         ocaml_ver       1:3.09.1
5 Summary:        Modules for Internet programming in OCaml
6 Summary(pl):    Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu
7 Name:           ocaml-net
8 Version:        1.1.1
9 Release:        4
10 License:        GPL v2
11 Group:          Libraries
12 Source0:        http://dl.sourceforge.net/ocamlnet/ocamlnet-%{version}.tar.gz
13 # Source0-md5:  4347d04ae16e69b61940f8679eeeef07
14 Patch0:         %{name}-Makefile.patch
15 URL:            http://ocamlnet.sourceforge.net/
16 BuildRequires:  ncurses-devel
17 BuildRequires:  ocaml >= %{ocaml_ver}
18 BuildRequires:  ocaml-equeue-devel >= 2.1.4
19 BuildRequires:  ocaml-findlib
20 BuildRequires:  ocaml-pcre-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Modules for Internet programming in OCaml.
25
26 %description -l pl
27 Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu.
28
29 %package doc
30 Summary:        ocaml-net documentation
31 Summary(pl):    Dokumentacja dla pakietów ocaml-net
32 Group:          Development/Libraries
33
34 %description doc
35 ocaml-net documentation.
36
37 %description doc -l pl
38 Dokumentacja dla pakietów ocaml-net.
39
40 %package netstring-devel
41 Summary:        String processing library
42 Summary(pl):    Biblioteka do przetwarzania napisów
43 Group:          Development/Libraries
44 %requires_eq    ocaml-pcre-devel
45 %requires_eq    ocaml
46
47 %description netstring-devel
48 String processing library, part of Ocamlnet. This package contains
49 files needed to develop OCaml programs using this library.
50
51 %description netstring-devel -l pl
52 Biblioteka do przetwarzania napisów, czê¶æ pakietu Ocamlnet. Pakiet
53 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
54 biblioteki.
55
56 %package nethttpd-devel
57 Summary:        HTTPd library
58 Summary(pl):    Biblioteka do obs³ugi protoko³u HTTP
59 Group:          Development/Libraries
60 %requires_eq    ocaml-pcre-devel
61 %requires_eq    ocaml
62
63 %description nethttpd-devel
64 HTTPd library, part of Ocamlnet. This package contains the files
65 needed to develop OCaml programs using this library.
66
67 %description nethttpd-devel -l pl
68 Biblioteka do obs³ugi protoko³u HTTP, czê¶æ pakietu Ocamlnet. Pakiet
69 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
70 biblioteki.
71
72 %package cgi-devel
73 Summary:        Common Gateway Interface library
74 Summary(pl):    Biblioteka do tworzenia skryptów CGI
75 Group:          Development/Libraries
76 Requires:       %{name}-netstring-devel = %{version}-%{release}
77 %requires_eq    ocaml
78
79 %description cgi-devel
80 Common Gateway Interface library, part of Ocamlnet. This package
81 contains files needed to develop OCaml programs using this library.
82
83 %description cgi-devel -l pl
84 Biblioteka do tworzenia skryptów CGI, czê¶æ pakietu Ocamlnet. Pakiet
85 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
86 biblioteki.
87
88 %package pop3-devel
89 Summary:        Post Office Protocol (POP3) library
90 Summary(pl):    Biblioteka do obs³ugi POP3
91 Group:          Development/Libraries
92 Requires:       %{name}-netstring-devel = %{version}-%{release}
93 %requires_eq    ocaml
94
95 %description pop3-devel
96 Post Office Protocol (POP3) library, part of Ocamlnet. This package
97 contains files needed to develop OCaml programs using this library.
98
99 %description pop3-devel -l pl
100 Biblioteka do obs³ugi POP3, czê¶æ pakietu Ocamlnet. Pakiet ten zawiera
101 pliki niezbêdne do tworzenia programów u¿ywaj±cych tej biblioteki.
102
103 %package smtp-devel
104 Summary:        Simple Mail Transfer Protocol (SMTP) library
105 Summary(pl):    Biblioteka do obs³ugi SMTP
106 Group:          Development/Libraries
107 Requires:       %{name}-netstring-devel = %{version}-%{release}
108 %requires_eq    ocaml
109
110 %description smtp-devel
111 Interface for the Simple Mail Tranfer Protocol (SMTP) as specified by
112 RFC 2821.
113
114 %description smtp-devel -l pl
115 Interfejs dla protoko³u SMTP wyszczególniony w RFC 2821.
116
117 %prep
118 %setup -q -n ocamlnet-%{version}
119 %patch0 -p1
120
121 %build
122 cd src
123 # no %%configure, please
124 ./configure \
125         -enable-findlib \
126         -enable-compatcgi \
127         -with-netstring \
128         -with-nethttpd \
129         -with-cgi \
130         -with-pop \
131         -with-smtp
132
133 sed -e 's/-g//' Makefile.rules > Makefile.rules.tmp
134 mv -f Makefile.rules.tmp Makefile.rules
135 %{__make} all opt
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139
140 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml
141
142 cd src
143 %{__make} -j1 install \
144         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 for f in smtp cgi pop netstring nethttpd; do
148         install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f
149         mv $RPM_BUILD_ROOT%{_libdir}/ocaml/$f/META \
150                 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/
151         echo "directory = \"+$f\"" \
152                 >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/META
153 done
154 cd ..
155 # not sure about *.o
156 rm $RPM_BUILD_ROOT%{_libdir}/ocaml/*/*.mli
157
158 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-{pop3,cgi,nethttpd}-%{version}
159 cp -r examples/{*cgi,jserv} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cgi-%{version}
160 cp -r examples/pop/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-pop3-%{version}
161 cp -r examples/nethttpd/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-nethttpd-%{version}
162
163 %clean
164 rm -rf $RPM_BUILD_ROOT
165
166 %files doc
167 %defattr(644,root,root,755)
168 %doc LICENSE README doc/html
169
170 %files nethttpd-devel
171 %defattr(644,root,root,755)
172 %dir %{_libdir}/ocaml/nethttpd
173 %{_libdir}/ocaml/nethttpd/*.cm[ixao]*
174 %{_libdir}/ocaml/nethttpd/*.a
175 %{_libdir}/ocaml/site-lib/nethttpd
176 %{_examplesdir}/%{name}-nethttpd-%{version}
177
178 %files netstring-devel
179 %defattr(644,root,root,755)
180 %dir %{_libdir}/ocaml/netstring
181 %{_libdir}/ocaml/netstring/*.cm[ixao]*
182 %{_libdir}/ocaml/netstring/*.a
183 %{_libdir}/ocaml/netstring/*.o
184 %attr(755,root,root) %{_libdir}/ocaml/netstring/*.so
185 %{_libdir}/ocaml/site-lib/netstring
186
187 %files cgi-devel
188 %defattr(644,root,root,755)
189 %dir %{_libdir}/ocaml/cgi
190 %{_libdir}/ocaml/cgi/*.cm[ixao]*
191 %{_libdir}/ocaml/cgi/*.a
192 %{_libdir}/ocaml/site-lib/cgi
193 %{_examplesdir}/%{name}-cgi-%{version}
194
195 %files pop3-devel
196 %defattr(644,root,root,755)
197 %dir %{_libdir}/ocaml/pop
198 %{_libdir}/ocaml/pop/*.cm[ixao]*
199 %{_libdir}/ocaml/pop/*.a
200 %{_libdir}/ocaml/site-lib/pop
201 %{_examplesdir}/%{name}-pop3-%{version}
202
203 %files smtp-devel
204 %defattr(644,root,root,755)
205 %dir %{_libdir}/ocaml/smtp
206 %{_libdir}/ocaml/smtp/*.cm[ixao]*
207 %{_libdir}/ocaml/smtp/*.a
208 %{_libdir}/ocaml/site-lib/smtp
This page took 0.070103 seconds and 3 git commands to generate.