specfile, request for comments

Rakotomandimby (R12y) Mihamina mihamina.rakotomandimby at etu.univ-orleans.fr
Thu May 26 08:20:58 UTC 2005


Hi,

Attached you will find a specfile about the ocaml-cryptokit package.
I'm not very clever on specfile :-), so may be you would have some
comments... It was initially from PLD 

http://ftp.nest.pld-linux.org/test/SRPMS/ocaml-cryptokit-1.2-1.src.rpm 

My doubts are about:

- the calling of "make" ( the CFLAGS...)
- the %{_docdir} was %{_examplesdir} but I had to change it because it
seems not to begin with a "/", so it fails because of that.

-- 
Get a fully managed dedicated server for €200/month ($257/month)
No time limit for taking care of your server.
You keep the "root" acces if you want. Billing periods are 3 months.
See the conditions at http://aspo.rktmb.org/activities/managed_servers
-------------- next part --------------
# $Revision: 1.6 $, $Date: 2003/07/25 09:02:05 $
Summary:	Cryptographic toolkit for OCaml
Summary(pl):	Biblioteka kryptograficzna dla OCamla
Name:		ocaml-cryptokit
Version:	1.3
Release:	fc3.1
License:	LGPL w/ linking exceptions
Group:		Libraries
Vendor:		Xavier Leroy <Xavier.Leroy at inria.fr>
URL:		http://pauillac.inria.fr/~xleroy/software.html
Source0:	cryptokit-%{version}.tar.gz
# Source0-md5:	0249135953f10c1515e88985b45ee4c9
BuildRequires:	zlib-devel
BuildRequires:	ocaml >= 3.08
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
The Cryptokit library for Objective Caml provides a variety of
cryptographic primitives that can be used to implement cryptographic
protocols in security-sensitive applications. The primitives provided
include: symmetric-key cryptography: AES, DES, Triple-DES, ARCfour, in
ECB, CBC, CFB and OFB modes; public-key cryptography: RSA; hash
functions and MACs: SHA-1, MD5, and MACs based on AES and DES; random
number generation; encodings and compression: base 64, hexadecimal,
Zlib compression.
This package contains files needed to run bytecode executables using
this library.

%package devel
Summary:	Cryptographic toolkit for OCaml - development part
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
%requires_eq	ocaml

%description devel
The Cryptokit library for Objective Caml provides a variety of
cryptographic primitives that can be used to implement cryptographic
protocols in security-sensitive applications. The primitives provided
include: symmetric-key cryptography: AES, DES, Triple-DES, ARCfour, in
ECB, CBC, CFB and OFB modes; public-key cryptography: RSA; hash
functions and MACs: SHA-1, MD5, and MACs based on AES and DES; random
number generation; encodings and compression: base 64, hexadecimal,
Zlib compression.
This package contains files needed to develop OCaml programs using
this library.

%prep
%setup -q -n cryptokit-%{version}

%build
make CFLAGS=" -fPIC" all allopt

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/cryptokit
make install INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/cryptokit

install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/cryptokit
install *.cm[ixa]* *.a dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/cryptokit
(cd $RPM_BUILD_ROOT%{_libdir}/ocaml && ln -s cryptokit/dll*.so .)

install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -r *test.ml $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/cryptokit
cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/cryptokit/META <<EOF
requires = "unix num"
version = "%{version}"
directory = "+cryptokit"
archive(byte) = "cryptokit.cma"
archive(native) = "cryptokit.cmxa"
linkopts = ""
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/cryptokit
%attr(755,root,root) %{_libdir}/ocaml/cryptokit/*
%{_libdir}/ocaml/*

%files devel
%defattr(644,root,root,755)
%doc LICENSE README doc
%{_libdir}/ocaml/cryptokit/*.cm[ixa]*
%{_libdir}/ocaml/cryptokit/*.a
%{_docdir}/%{name}-%{version}
%{_libdir}/ocaml/site-lib/cryptokit

%changelog

* Thu May 26 2005 Mihamina Rakotomandimby <mihamina.rakotomandimby at etu.univ-orleans.fr> 1.3.fc3
- First build for FC3
- Taken from the PLF specfile (wich was an 1.2)


More information about the fedora-devel-list mailing list