]>
Commit | Line | Data |
---|---|---|
4067530e SP |
1 | # TODO: |
2 | # - nethttpd needs to be packaged | |
4067530e | 3 | # |
5671f985 | 4 | %define ocaml_ver 1:3.09.2 |
cfdcf47a | 5 | Summary: Modules for Internet programming in OCaml |
a73a9323 | 6 | Summary(pl.UTF-8): Moduły ułatwiające pisanie programów internetowych w OCamlu |
cfdcf47a | 7 | Name: ocaml-net |
ab4d9418 | 8 | Version: 1.1.1 |
5671f985 | 9 | Release: 5 |
9700f788 | 10 | License: GPL v2 |
cfdcf47a | 11 | Group: Libraries |
4583fe32 | 12 | Source0: http://dl.sourceforge.net/ocamlnet/ocamlnet-%{version}.tar.gz |
ab4d9418 | 13 | # Source0-md5: 4347d04ae16e69b61940f8679eeeef07 |
034470d4 | 14 | Patch0: %{name}-Makefile.patch |
cfdcf47a | 15 | URL: http://ocamlnet.sourceforge.net/ |
91c26977 | 16 | BuildRequires: ncurses-devel |
034470d4 | 17 | BuildRequires: ocaml >= %{ocaml_ver} |
8f16e32a | 18 | BuildRequires: ocaml-equeue-devel >= 2.1.4 |
2860521a SP |
19 | BuildRequires: ocaml-findlib |
20 | BuildRequires: ocaml-pcre-devel | |
cfdcf47a MM |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
802c9167 MM |
24 | Modules for Internet programming in OCaml. |
25 | ||
a73a9323 JR |
26 | %description -l pl.UTF-8 |
27 | Moduły ułatwiające pisanie programów internetowych w OCamlu. | |
cfdcf47a | 28 | |
9de7b5fa JR |
29 | %package doc |
30 | Summary: ocaml-net documentation | |
a73a9323 | 31 | Summary(pl.UTF-8): Dokumentacja dla pakietów ocaml-net |
9de7b5fa JR |
32 | Group: Development/Libraries |
33 | ||
34 | %description doc | |
9906ddba | 35 | ocaml-net documentation. |
9de7b5fa | 36 | |
a73a9323 JR |
37 | %description doc -l pl.UTF-8 |
38 | Dokumentacja dla pakietów ocaml-net. | |
9de7b5fa | 39 | |
cfdcf47a MM |
40 | %package netstring-devel |
41 | Summary: String processing library | |
a73a9323 | 42 | Summary(pl.UTF-8): Biblioteka do przetwarzania napisów |
cfdcf47a MM |
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 | ||
a73a9323 JR |
51 | %description netstring-devel -l pl.UTF-8 |
52 | Biblioteka do przetwarzania napisów, część pakietu Ocamlnet. Pakiet | |
53 | ten zawiera pliki niezbędne do tworzenia programów używających tej | |
cfdcf47a MM |
54 | biblioteki. |
55 | ||
9de7b5fa JR |
56 | %package nethttpd-devel |
57 | Summary: HTTPd library | |
a73a9323 | 58 | Summary(pl.UTF-8): Biblioteka do obsługi protokołu HTTP |
9de7b5fa JR |
59 | Group: Development/Libraries |
60 | %requires_eq ocaml-pcre-devel | |
61 | %requires_eq ocaml | |
62 | ||
63 | %description nethttpd-devel | |
9906ddba JB |
64 | HTTPd library, part of Ocamlnet. This package contains the files |
65 | needed to develop OCaml programs using this library. | |
9de7b5fa | 66 | |
a73a9323 JR |
67 | %description nethttpd-devel -l pl.UTF-8 |
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 | |
9de7b5fa JR |
70 | biblioteki. |
71 | ||
cfdcf47a MM |
72 | %package cgi-devel |
73 | Summary: Common Gateway Interface library | |
a73a9323 | 74 | Summary(pl.UTF-8): Biblioteka do tworzenia skryptów CGI |
cfdcf47a MM |
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 | ||
a73a9323 JR |
83 | %description cgi-devel -l pl.UTF-8 |
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 | |
cfdcf47a MM |
86 | biblioteki. |
87 | ||
88 | %package pop3-devel | |
89 | Summary: Post Office Protocol (POP3) library | |
a73a9323 | 90 | Summary(pl.UTF-8): Biblioteka do obsługi POP3 |
cfdcf47a MM |
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 | ||
a73a9323 JR |
99 | %description pop3-devel -l pl.UTF-8 |
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. | |
cfdcf47a | 102 | |
4067530e | 103 | %package smtp-devel |
034470d4 | 104 | Summary: Simple Mail Transfer Protocol (SMTP) library |
a73a9323 | 105 | Summary(pl.UTF-8): Biblioteka do obsługi SMTP |
034470d4 ER |
106 | Group: Development/Libraries |
107 | Requires: %{name}-netstring-devel = %{version}-%{release} | |
4067530e SP |
108 | %requires_eq ocaml |
109 | ||
110 | %description smtp-devel | |
034470d4 ER |
111 | Interface for the Simple Mail Tranfer Protocol (SMTP) as specified by |
112 | RFC 2821. | |
8735b5fe | 113 | |
a73a9323 JR |
114 | %description smtp-devel -l pl.UTF-8 |
115 | Interfejs dla protokołu SMTP wyszczególniony w RFC 2821. | |
4067530e | 116 | |
cfdcf47a MM |
117 | %prep |
118 | %setup -q -n ocamlnet-%{version} | |
1cf7661c | 119 | %patch0 -p1 |
cfdcf47a MM |
120 | |
121 | %build | |
122 | cd src | |
123 | # no %%configure, please | |
124 | ./configure \ | |
125 | -enable-findlib \ | |
9de7b5fa | 126 | -enable-compatcgi \ |
cfdcf47a | 127 | -with-netstring \ |
9de7b5fa | 128 | -with-nethttpd \ |
cfdcf47a | 129 | -with-cgi \ |
9de7b5fa JR |
130 | -with-pop \ |
131 | -with-smtp | |
cfdcf47a MM |
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 | ||
7b251678 MM |
140 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml |
141 | ||
cfdcf47a | 142 | cd src |
9de7b5fa JR |
143 | %{__make} -j1 install \ |
144 | OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \ | |
145 | DESTDIR=$RPM_BUILD_ROOT | |
7b251678 | 146 | |
9de7b5fa | 147 | for f in smtp cgi pop netstring nethttpd; do |
cfdcf47a MM |
148 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f |
149 | mv $RPM_BUILD_ROOT%{_libdir}/ocaml/$f/META \ | |
7b251678 | 150 | $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/ |
cfdcf47a MM |
151 | echo "directory = \"+$f\"" \ |
152 | >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/META | |
153 | done | |
154 | cd .. | |
7b251678 MM |
155 | # not sure about *.o |
156 | rm $RPM_BUILD_ROOT%{_libdir}/ocaml/*/*.mli | |
cfdcf47a | 157 | |
9de7b5fa JR |
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} | |
cfdcf47a | 160 | cp -r examples/pop/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-pop3-%{version} |
9de7b5fa | 161 | cp -r examples/nethttpd/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-nethttpd-%{version} |
cfdcf47a | 162 | |
cfdcf47a MM |
163 | %clean |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | ||
9de7b5fa JR |
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} | |
4067530e | 177 | |
cfdcf47a MM |
178 | %files netstring-devel |
179 | %defattr(644,root,root,755) | |
cfdcf47a | 180 | %dir %{_libdir}/ocaml/netstring |
4b20b465 | 181 | %{_libdir}/ocaml/netstring/*.cm[ixao]* |
cfdcf47a | 182 | %{_libdir}/ocaml/netstring/*.a |
4067530e | 183 | %{_libdir}/ocaml/netstring/*.o |
9de7b5fa | 184 | %attr(755,root,root) %{_libdir}/ocaml/netstring/*.so |
cfdcf47a MM |
185 | %{_libdir}/ocaml/site-lib/netstring |
186 | ||
187 | %files cgi-devel | |
188 | %defattr(644,root,root,755) | |
cfdcf47a | 189 | %dir %{_libdir}/ocaml/cgi |
4b20b465 | 190 | %{_libdir}/ocaml/cgi/*.cm[ixao]* |
cfdcf47a MM |
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) | |
cfdcf47a | 197 | %dir %{_libdir}/ocaml/pop |
4b20b465 | 198 | %{_libdir}/ocaml/pop/*.cm[ixao]* |
cfdcf47a MM |
199 | %{_libdir}/ocaml/pop/*.a |
200 | %{_libdir}/ocaml/site-lib/pop | |
201 | %{_examplesdir}/%{name}-pop3-%{version} | |
4067530e SP |
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 | |
9de7b5fa | 208 | %{_libdir}/ocaml/site-lib/smtp |