Rakotomandimby (R12y) Mihamina wrote:
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
This should probably have been posted to fedora-extras-list (since ocaml
is in Extras, not Core). In fact I'd suggest posting again there for
more feedback.
My doubts are about:
- the calling of "make" ( the CFLAGS...)
I'd use:
make CFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all allopt
- the %{_docdir} was %{_examplesdir} but I had to change it because it
seems not to begin with a "/", so it fails because of that.
I'd just stick the examples in an "examples" subdirectory and then
include that in %doc
Suggested changes:
- Use Extras Dist Tag in Release:
(http://fedoraproject.org/wiki/DistTag)
- Dispense with Source0-md5 comment that refers to a previous release
- Use a full URL for Source0
- remove .cvsignore file(s) presumably included upstream by mistake
- specifying modes with %attr shouldn't be necessary if the upstream
Makefiles get it right
- split documentation between base and -devel packages
- be more specific in %files selections, with less globbing
I've attached an updated spec file taking these suggestions into account.
Paul.
# $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: 1%{?dist}
License: LGPL w/ linking exceptions
Group: System Environment/Libraries
Vendor: Xavier Leroy <Xavier.Leroy@xxxxxxxx>
URL: http://pauillac.inria.fr/~xleroy/software.html
Source0: http://caml.inria.fr/distrib/bazar-ocaml/cryptokit-%{version}.tar.gz
BuildRequires: zlib-devel
BuildRequires: ocaml >= 3.08
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
%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}
%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}
find . -name .cvsignore -exec rm -f {} \;
%build
make CFLAGS="%{optflags} -fPIC" %{?_smp_mflags} 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 .)
mkdir examples
cp -p *test.ml examples
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(-,root,root,755)
%doc LICENSE README Changes
%dir %{_libdir}/ocaml/cryptokit
%{_libdir}/ocaml/cryptokit/*.so
%{_libdir}/ocaml/cryptokit/cryptokit.mli
%{_libdir}/ocaml/cryptokit/stublibs
%{_libdir}/ocaml/*.so
%files devel
%defattr(-,root,root,755)
%doc doc examples
%{_libdir}/ocaml/cryptokit/*.cm[ixa]*
%{_libdir}/ocaml/cryptokit/*.a
%{_libdir}/ocaml/site-lib/cryptokit
%changelog
* Thu May 26 2005 Mihamina Rakotomandimby <mihamina.rakotomandimby@xxxxxxxxxxxxxxxxxxx> 1.3-1%{?dist}
- First build for FC3
- Taken from the PLD specfile (which was an 1.2)
--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-devel-list