Rakotomandimby (R12y) Mihamina wrote:
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.
------------------------------------------------------------------------
# $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
I would avoid using a release name with a letter like that. Use
something safer like: 1.fc3.1
License: LGPL w/ linking exceptions
Group: Libraries
Vendor: Xavier Leroy <Xavier.Leroy@xxxxxxxx>
"Vendor" should *NEVER* be put in a spec file. It should be put
in per user .rpmmacros rpm config file, or system wide on the build
system that is being used for package generation. Ditto for
"Distribution:" and "Packager"
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
Should be:
make CFLAGS="$RPM_OPT_FLAGS -fPIC" all allopt
Should -fPIC be there for all architectures? Sounds wrong to me.
install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -r *test.ml $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
This should probably be done instead using %doc in %files section.
%files
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/cryptokit
%attr(755,root,root) %{_libdir}/ocaml/cryptokit/*
In general, it's cleaner to use "install -m755" to install files mode
755 than to override it in %files.
%{_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}
This _docdir line is unnecessary.
--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-devel-list