]> git.pld-linux.org Git - packages/ocaml-net.git/blob - ocaml-net.spec
- added missing BR: ocaml-equeue
[packages/ocaml-net.git] / ocaml-net.spec
1 Summary:        Modules for Internet programming in OCaml
2 Summary(pl):    Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu
3 Name:           ocaml-net
4 Version:        1.1
5 Release:        1
6 License:        GPL v2
7 Group:          Libraries
8 Source0:        http://dl.sourceforge.net/ocamlnet/ocamlnet-%{version}.tar.gz
9 # Source0-md5:  2ec265aeea6a6470e7493ab047cef261
10 URL:            http://ocamlnet.sourceforge.net/
11 BuildRequires:  ncurses-devel
12 BuildRequires:  ocaml >= 3.04-7
13 BuildRequires:  ocaml-equeue
14 BuildRequires:  ocaml-findlib
15 BuildRequires:  ocaml-pcre-devel
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 Modules for Internet programming in OCaml.
20
21 %description -l pl
22 Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu.
23
24 %package netstring-devel
25 Summary:        String processing library
26 Summary(pl):    Biblioteka do przetwarzania napisów
27 Group:          Development/Libraries
28 %requires_eq    ocaml-pcre-devel
29 %requires_eq    ocaml
30
31 %description netstring-devel
32 String processing library, part of Ocamlnet. This package contains
33 files needed to develop OCaml programs using this library.
34
35 %description netstring-devel -l pl
36 Biblioteka do przetwarzania napisów, czê¶æ pakietu Ocamlnet. Pakiet
37 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
38 biblioteki.
39
40 %package cgi-devel
41 Summary:        Common Gateway Interface library
42 Summary(pl):    Biblioteka do tworzenia skryptów CGI
43 Group:          Development/Libraries
44 Requires:       %{name}-netstring-devel = %{version}-%{release}
45 %requires_eq    ocaml
46
47 %description cgi-devel
48 Common Gateway Interface library, part of Ocamlnet. This package
49 contains files needed to develop OCaml programs using this library.
50
51 %description cgi-devel -l pl
52 Biblioteka do tworzenia skryptów CGI, czê¶æ pakietu Ocamlnet. Pakiet
53 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
54 biblioteki.
55
56 %package pop3-devel
57 Summary:        Post Office Protocol (POP3) library
58 Summary(pl):    Biblioteka do obs³ugi POP3
59 Group:          Development/Libraries
60 Requires:       %{name}-netstring-devel = %{version}-%{release}
61 %requires_eq    ocaml
62
63 %description pop3-devel
64 Post Office Protocol (POP3) library, part of Ocamlnet. This package
65 contains files needed to develop OCaml programs using this library.
66
67 %description pop3-devel -l pl
68 Biblioteka do obs³ugi POP3, czê¶æ pakietu Ocamlnet. Pakiet ten zawiera
69 pliki niezbêdne do tworzenia programów u¿ywaj±cych tej biblioteki.
70
71 %prep
72 %setup -q -n ocamlnet-%{version}
73
74 %build
75 cd src
76 # no %%configure, please
77 ./configure \
78         -enable-findlib \
79         -with-netstring \
80         -with-cgi \
81         -with-pop
82
83 sed -e 's/-g//' Makefile.rules > Makefile.rules.tmp
84 mv -f Makefile.rules.tmp Makefile.rules
85 %{__make} all opt
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml
91
92 cd src
93 %{__make} install OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
94
95 for f in cgi pop netstring ; do
96         install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f
97         mv $RPM_BUILD_ROOT%{_libdir}/ocaml/$f/META \
98                 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/
99         echo "directory = \"+$f\"" \
100                 >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/META
101 done
102 cd ..
103 # not sure about *.o
104 rm $RPM_BUILD_ROOT%{_libdir}/ocaml/*/*.mli
105
106 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-{pop3,cgi}-%{version}
107 cp -r examples/{cgi,jserv} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cgi-%{version}
108 cp -r examples/pop/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-pop3-%{version}
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %files netstring-devel
114 %defattr(644,root,root,755)
115 %doc LICENSE README doc/intro/html
116 %dir %{_libdir}/ocaml/netstring
117 %{_libdir}/ocaml/netstring/*.cm[ixao]*
118 %{_libdir}/ocaml/netstring/*.a
119 %{_libdir}/ocaml/site-lib/netstring
120
121 %files cgi-devel
122 %defattr(644,root,root,755)
123 %dir %{_libdir}/ocaml/cgi
124 %{_libdir}/ocaml/cgi/*.cm[ixao]*
125 %{_libdir}/ocaml/cgi/*.a
126 %{_libdir}/ocaml/site-lib/cgi
127 %{_examplesdir}/%{name}-cgi-%{version}
128
129 %files pop3-devel
130 %defattr(644,root,root,755)
131 %dir %{_libdir}/ocaml/pop
132 %{_libdir}/ocaml/pop/*.cm[ixao]*
133 %{_libdir}/ocaml/pop/*.a
134 %{_libdir}/ocaml/site-lib/pop
135 %{_examplesdir}/%{name}-pop3-%{version}
This page took 0.154591 seconds and 4 git commands to generate.