]> git.pld-linux.org Git - packages/libmd.git/commitdiff
- unmaintained martin.hinner.info implementation replaced by maintained one auto/th/libmd-1.0.3-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 9 May 2021 20:00:35 +0000 (22:00 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 9 May 2021 20:00:35 +0000 (22:00 +0200)
  (fdo/hadrons.org, version 1.0.3, formerly in libmd-bsd.spec)

hardrons.org libmd (referred as libmd-bsd) is functionally superset of m.h.i libmd
(referred as libmd 0.3), mostly API (not ABI) compatible, except for:
1) context struct layout (but I assume this as library internals)
2) digest/buffer size defines
3) SHA1 function names (libmd 0.3 uses SHA prefix, libmd-bsd SHA1 or SHA1_)
4) size types: libmd 0.3 uses (32-bit) unsigned int, while libmd-bsd is
   64-bit clean

libmd-install.patch [deleted file]
libmd-types.patch [deleted file]
libmd.spec
soname.patch [deleted file]

diff --git a/libmd-install.patch b/libmd-install.patch
deleted file mode 100644 (file)
index 016f599..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---- 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)/
diff --git a/libmd-types.patch b/libmd-types.patch
deleted file mode 100644 (file)
index 286f3b2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- libmd-0.3/rmd160.c.orig    1999-07-31 15:49:32.000000000 +0200
-+++ libmd-0.3/rmd160.c 2015-07-16 21:52:58.361033103 +0200
-@@ -378,7 +378,7 @@
-    Update the RIPEMD-160 hash state for a block of data.
-  */
- void
--RMD160Update (RMD160_CTX * ctx, u_int8_t const *buf, size_t len)
-+RMD160Update (RMD160_CTX * ctx, u_int8_t const *buf, unsigned len)
- {
-   unsigned i;
index e65480b79b9130a9031cc62673f796729d7d34cb..ca1274e401782bc90e2e2636d9ed44cc7f3390a6 100644 (file)
@@ -1,87 +1,75 @@
-Summary:       Message digest library
-Summary(pl.UTF-8):     Biblioteka skrótów wiadomości (Message Digest)
+Summary:       Message Digest functions from BSD systems
+Summary(pl.UTF-8):     Funkcje skrótów wiadomości (MD) z systemów BSD
 Name:          libmd
-Version:       0.3
-Release:       3
-License:       RSA non-commercial (MD2), RSA BSD-like (MD4), Public Domain (MD5)
+Version:       1.0.3
+Release:       1
+License:       BSD, ISC, Public Domain
 Group:         Libraries
-Source0:       ftp://ftp.penguin.cz/pub/users/mhi/libmd/%{name}-%{version}.tar.bz2
-# Source0-md5: 1db1795b7e87bbda542e4c33b6ce5566
-Patch0:                %{name}-install.patch
-Patch1:                %{name}-types.patch
-Patch2:                soname.patch
-URL:           http://martin.hinner.info/libmd/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: sgml-tools
+Source0:       https://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.xz
+# Source0-md5: 58f9a39d0a4296c7d2d59287d4f81cdf
+URL:           https://www.hadrons.org/software/libmd/
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Obsoletes:     libmd-bsd < 1.0.4
 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>
+This library provides message digest functions found on BSD systems
+either on their libc or libmd libraries and lacking on others like GNU
+systems, thus making it easier to port projects with strong BSD
+origins, without needing to embed the same code over and over again on
+each project.
 
 %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>
+Ta biblioteka udostępnia funkcje skrótów wiadomości spotykane w
+systemach BSD w bibliotece libc lub libmd, a nie występujące na
+innych systemach, takich jak GNU. Dzięki temu ułatwia portowanie
+projektów mających silne korzenie BSD bez potrzeby osadzania ciągle
+tego samego kodu w każdym projekcie.
 
 %package devel
-Summary:       Header files for libmd library
-Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libmd
+Summary:       Header files for BSD MD library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki BSD MD
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Obsoletes:     libmd-bsd-devel < 1.0.4
 
 %description devel
-Header files for libmd library.
+Header files for BSD MD library.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki libmd.
+Pliki nagłówkowe biblioteki BSD MD.
 
 %package static
-Summary:       Static libmd library
-Summary(pl.UTF-8):     Statyczna biblioteka libmd
+Summary:       Static BSD MD library
+Summary(pl.UTF-8):     Statyczna biblioteka BSD MD
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
+Obsoletes:     libmd-bsd-static < 1.0.4
 
 %description static
-Static libmd library.
+Static BSD MD library.
 
 %description static -l pl.UTF-8
-Statyczna biblioteka libmd.
+Statyczna biblioteka BSD MD.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
-cp -f /usr/share/automake/config.* .
-%{__autoconf}
-%configure
-
-%{__make} \
-       CFLAGS="%{rpmcflags} %{rpmcppflags} -fPIC -I."
-
-%{__make} -C docs libmd.txt
+%configure \
+       --disable-silent-rules \
+       --includedir=%{_includedir}/libmd
+%{__make}
 
 %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}
+       DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libmd.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -91,18 +79,29 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
+%doc COPYING ChangeLog README
+%attr(755,root,root) %{_libdir}/libmd.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmd.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc docs/libmd.txt docs/algorithms
 %attr(755,root,root) %{_libdir}/libmd.so
 %{_includedir}/libmd
+%{_pkgconfigdir}/libmd.pc
+%{_mandir}/man3/MD2*.3*
+%{_mandir}/man3/MD4*.3*
+%{_mandir}/man3/MD5*.3*
+%{_mandir}/man3/RMD160*.3*
+%{_mandir}/man3/SHA1*.3*
+%{_mandir}/man3/SHA256*.3*
+%{_mandir}/man3/SHA384*.3*
+%{_mandir}/man3/SHA512*.3*
 %{_mandir}/man3/md2.3*
 %{_mandir}/man3/md4.3*
 %{_mandir}/man3/md5.3*
+%{_mandir}/man3/rmd160.3*
+%{_mandir}/man3/sha1.3*
+%{_mandir}/man3/sha2.3*
 
 %files static
 %defattr(644,root,root,755)
diff --git a/soname.patch b/soname.patch
deleted file mode 100644 (file)
index 77b638d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- libmd-0.3/Makefile.in~     2018-10-31 19:29:24.000000000 +0100
-+++ libmd-0.3/Makefile.in      2018-10-31 19:31:27.028214752 +0100
-@@ -94,7 +94,7 @@
-       cat md5.copyright >> $@
- libmd.so.1.0: $(OBJ)
--      $(CC) -shared -o libmd.so.1.0 $(OBJ)
-+      $(CC) -shared -Wl,-soname,libmd.so.1 -o libmd.so.1.0 $(OBJ)
- libmd.a:      $(OBJ)
-       rm -f libmd.a
This page took 0.127431 seconds and 4 git commands to generate.