]> git.pld-linux.org Git - packages/libtomcrypt.git/commitdiff
- new
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 May 2013 15:22:48 +0000 (17:22 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 May 2013 15:22:48 +0000 (17:22 +0200)
libtomcrypt-link.patch [new file with mode: 0644]
libtomcrypt.spec [new file with mode: 0644]

diff --git a/libtomcrypt-link.patch b/libtomcrypt-link.patch
new file mode 100644 (file)
index 0000000..288dd0c
--- /dev/null
@@ -0,0 +1,55 @@
+--- libtomcrypt-1.17/testprof/makefile.shared.orig     2007-05-12 16:46:25.000000000 +0200
++++ libtomcrypt-1.17/testprof/makefile.shared  2013-05-19 15:00:01.416666385 +0200
+@@ -1,4 +1,5 @@
+-CC=libtool --mode=compile gcc
++CC=libtool --mode=compile --tag=CC gcc
++CCLD=libtool --mode=link --tag=CC gcc
+ CFLAGS += -I../src/headers -I./ -Wall -W
+@@ -18,7 +19,7 @@
+ default: $(LIBTEST)
+ $(LIBTEST): $(OBJECTS)
+-      libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" |  xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
++      $(CCLD) $(CFLAGS) `find . -type f | grep "[.]lo" |  xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION) ../libtomcrypt.la
+ install: $(LIBTEST)
+       libtool --silent --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)
+--- libtomcrypt-1.17/makefile.shared.orig      2007-05-12 16:46:25.000000000 +0200
++++ libtomcrypt-1.17/makefile.shared   2013-05-19 15:00:57.236664043 +0200
+@@ -10,6 +10,7 @@
+ # Compiler and Linker Names
+ CC=libtool --mode=compile --tag=CC gcc 
++CCLD=libtool --mode=link --tag=CC gcc
+ # ranlib tools
+ ifndef RANLIB
+@@ -242,20 +242,22 @@
+ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
+ #This rule makes the libtomcrypt library.
++all: library testprof/$(LIBTEST)
++
+ library: $(LIBNAME)
+-testprof/$(LIBTEST):
++testprof/$(LIBTEST): $(LIBNAME)
+       cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) make -f makefile.shared
+ objs: $(OBJECTS)
+-$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
+-      libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
++$(LIBNAME): $(OBJECTS)
++      $(CCLD) $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
+ install: $(LIBNAME)
+       install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+-      cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
+       libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
++      cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
+       install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
+       install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
diff --git a/libtomcrypt.spec b/libtomcrypt.spec
new file mode 100644 (file)
index 0000000..24a191a
--- /dev/null
@@ -0,0 +1,99 @@
+Summary:       LibTomCrypt - fairly comprehensive, modular and portable cryptographic toolkit
+Summary(pl.UTF-8):     LibTomCrypt - dość obszerna, modularna i przenośna biblioteka kryptograficzna
+Name:          libtomcrypt
+Version:       1.17
+Release:       1
+License:       Public Domain
+Group:         Libraries
+Source0:       http://libtom.org/files/crypt-%{version}.tar.bz2
+# Source0-md5: cea7e5347979909f458fe7ebb5a44f85
+Patch0:                %{name}-link.patch
+URL:           http://libtom.org/?page=features&whatfile=crypt
+BuildRequires: libtool
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LibTomCrypt is a fairly comprehensive, modular and portable
+cryptographic toolkit that provides developers with a vast array of
+well known published block ciphers, one-way hash functions, chaining
+modes, pseudo-random number generators, public key cryptography and a
+plethora of other routines.
+
+%description -l pl.UTF-8
+LibTomCrypt to dość obszerna, modularna i przenośna biblioteka
+kryptograficzna, zapewniająca programistom szeroki zbiór dobrze
+znanych szyfrów blokowych, jednokierunkowych funkcji haszujących,
+trybów łańcuchowych, generatorów liczb pseudolosowych, kryptografii
+klucza publicznego oraz wiele innych procedur.
+
+%package devel
+Summary:       Header files for LibTomCrypt library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki LibTomCrypt
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for LibTomCrypt library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LibTomCrypt.
+
+%package static
+Summary:       Static LibTomCrypt library
+Summary(pl.UTF-8):     Statyczna biblioteka LibTomCrypt
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static LibTomCrypt library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LibTomCrypt.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+CFLAGS="%{rpmcflags}" \
+%{__make} -f makefile.shared \
+       CC="libtool --mode=compile --tag=CC %{__cc}" \
+       CCLD="libtool --mode=link --tag=CC %{__cc}" \
+       LIBPATH=%{_libdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -f makefile.shared install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       LIBPATH=%{_libdir} \
+       GROUP=$(id -ng) \
+       USER=$(id -nu)
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE TODO changes
+%attr(755,root,root) %{_libdir}/libtomcrypt.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtomcrypt.so.0
+%attr(755,root,root) %{_libdir}/libtomcrypt_prof.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtomcrypt_prof.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%doc doc/crypt.pdf notes/*.txt
+%attr(755,root,root) %{_libdir}/libtomcrypt.so
+%attr(755,root,root) %{_libdir}/libtomcrypt_prof.so
+%{_libdir}/libtomcrypt.la
+%{_libdir}/libtomcrypt_prof.la
+%{_includedir}/tomcrypt*.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libtomcrypt.a
+%{_libdir}/libtomcrypt_prof.a
This page took 0.150945 seconds and 4 git commands to generate.