[packages/libmd] - new spec

qboosh qboosh at pld-linux.org
Thu Jul 16 20:17:58 CEST 2015


commit fba874f6013b91cbf7488287f1e1e35f1079c50d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jul 16 20:18:41 2015 +0200

    - new spec

 libmd-install.patch |  44 ++++++++++++++++++++++
 libmd.spec          | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 147 insertions(+)
---
diff --git a/libmd.spec b/libmd.spec
new file mode 100644
index 0000000..bccbe47
--- /dev/null
+++ b/libmd.spec
@@ -0,0 +1,103 @@
+Summary:	Message digest library
+Summary(pl.UTF-8):	Biblioteka skrótów wiadomości (Message Digest)
+Name:		libmd
+Version:	0.3
+Release:	1
+License:	RSA non-commercial (MD2), RSA BSD-like (MD4), Public Domain (MD5)
+Group:		Libraries
+Source0:	ftp://ftp.penguin.cz/pub/users/mhi/libmd/%{name}-%{version}.tar.bz2
+# Source0-md5:	1db1795b7e87bbda542e4c33b6ce5566
+Patch0:		%{name}-install.patch
+URL:		http://martin.hinner.info/libmd/
+BuildRequires:	autoconf
+BuildRequires:	sgml-tools
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Libmd is a cryptographic message digest library. It implements these
+message digest algorithms:
+ - MD2 (RFC 1319 - B. Kaliski)
+ - MD4 (RFC 1186 - R. Rivest)
+ - MD5 (RFC 1321 - R. Rivest)
+ - SHA-1 (FIPS PUB 180 and 180.1 - NIST)
+ - RIPEMD-160 <http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html>
+
+%description -l pl.UTF-8
+Libmd to biblioteka kryptograficznych skrótów wiadomości. Implementuje
+następujące algorytmy skrótów wiadomości:
+ - MD2 (RFC 1319 - B. Kaliski)
+ - MD4 (RFC 1186 - R. Rivest)
+ - MD5 (RFC 1321 - R. Rivest)
+ - SHA-1 (FIPS PUB 180 oraz 180.1 - NIST)
+ - RIPEMD-160 <http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html>
+
+%package devel
+Summary:	Header files for libmd library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libmd
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for libmd library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libmd.
+
+%package static
+Summary:	Static libmd library
+Summary(pl.UTF-8):	Statyczna biblioteka libmd
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libmd library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libmd.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__autoconf}
+%configure
+
+%{__make} \
+	CFLAGS="%{rpmcflags} %{rpmcppflags} -fPIC -I."
+
+%{__make} -C docs libmd.txt
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# install headers to include/libmd to avoid too common filenames under /usr/include
+%{__make} install \
+	BUILDROOT=$RPM_BUILD_ROOT \
+	includedir=%{_includedir}/libmd \
+	libdir=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README TODO md2.copyright md4.copyright md5.copyright
+%attr(755,root,root) %{_libdir}/libmd.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmd.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%doc docs/libmd.txt docs/algorithms
+%attr(755,root,root) %{_libdir}/libmd.so
+%{_includedir}/libmd
+%{_mandir}/man3/md2.3*
+%{_mandir}/man3/md4.3*
+%{_mandir}/man3/md5.3*
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmd.a
diff --git a/libmd-install.patch b/libmd-install.patch
new file mode 100644
index 0000000..016f599
--- /dev/null
+++ b/libmd-install.patch
@@ -0,0 +1,44 @@
+--- libmd-0.3/Makefile.in.orig	2000-05-10 15:39:03.000000000 +0200
++++ libmd-0.3/Makefile.in	2015-07-16 20:03:11.740639943 +0200
+@@ -15,6 +15,12 @@
+ OUTDIR=$(PWD)/..
+ SRCDIR=$(PWD)
+ 
++prefix=/usr
++includedir=$(prefix)/include
++libdir=$(prefix)/lib
++datadir=$(prefix)/share
++mandir=$(datadir)/man
++
+ all:	libmd.so.1.0 md2.3 md4.3 md5.3 libmd.a docs
+ 
+ clean:
+@@ -32,17 +38,17 @@
+ 	./mddriver
+ 
+ install:	libmd.so.1.0 libmd.so.1 libmd.so
+-	mkdir -p $(BUILDROOT)/usr/include
+-	mkdir -p $(BUILDROOT)/usr/lib
+-	mkdir -p $(BUILDROOT)/usr/man/man3
+-	$(INSTALL) -g root -o root -m 644 md2.h md4.h md5.h sha.h rmd160.h \
+-		   $(BUILDROOT)/usr/include
+-	$(INSTALL) -g root -o root -m 644 md2.3 md4.3 md5.3 \
+-		   $(BUILDROOT)/usr/man/man3
+-	$(INSTALL) -g root -o root -m 755 libmd.so.1.0 $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.so.1 $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.so $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.a $(BUILDROOT)/usr/lib
++	mkdir -p $(BUILDROOT)$(includedir)
++	mkdir -p $(BUILDROOT)$(libdir)
++	mkdir -p $(BUILDROOT)$(mandir)/man3
++	$(INSTALL) -m 644 md2.h md4.h md5.h sha.h rmd160.h \
++		   $(BUILDROOT)$(includedir)
++	$(INSTALL) -m 644 md2.3 md4.3 md5.3 \
++		   $(BUILDROOT)$(mandir)/man3
++	$(INSTALL) -m 755 libmd.so.1.0 $(BUILDROOT)$(libdir)
++	ln -s libmd.so.1.0 $(BUILDROOT)$(libdir)/libmd.so.1
++	ln -s libmd.so.1.0 $(BUILDROOT)$(libdir)/libmd.so
++	$(INSTALL) -m 644 libmd.a $(BUILDROOT)$(libdir)
+ 
+ binary:	install
+ 	@echo Creating binary .tar.bz2 in directory $(OUTDIR)/
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmd.git/commitdiff/fba874f6013b91cbf7488287f1e1e35f1079c50d



More information about the pld-cvs-commit mailing list