diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2013-08-15 16:25:54 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2013-08-15 16:25:54 +0200 |
commit | 4fbe278eb4908a974d16211154b0299991e41876 (patch) | |
tree | a58784e04ee0a442cff436b5e707a83cfc7ef048 /package/polarssl | |
parent | 15fa797d71e47fc936cd0a9bca8207ba7a3c8a81 (diff) |
add polarssl package
Diffstat (limited to 'package/polarssl')
-rw-r--r-- | package/polarssl/Makefile | 40 | ||||
-rw-r--r-- | package/polarssl/patches/patch-Makefile | 36 | ||||
-rw-r--r-- | package/polarssl/patches/patch-library_Makefile | 48 | ||||
-rw-r--r-- | package/polarssl/patches/patch-programs_Makefile | 20 |
4 files changed, 144 insertions, 0 deletions
diff --git a/package/polarssl/Makefile b/package/polarssl/Makefile new file mode 100644 index 000000000..145ae67ef --- /dev/null +++ b/package/polarssl/Makefile @@ -0,0 +1,40 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= polarssl +PKG_VERSION:= 1.2.8 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 985151639b1ca037293f06da44fbc6bc +PKG_DESCR:= embedded SSL/TLS library +PKG_SECTION:= libs +PKG_URL:= https://polarssl.org/ +PKG_SITES:= https://polarssl.org/download/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-gpl.tgz + +PKG_SUBPKGS:= LIBPOLARSSL LIBPOLARSSL_DEV + +include $(TOPDIR)/mk/package.mk + +PKGSD_LIBPOLARSSL_DEV:= development files for polarssl +PKGSC_LIBPOLARSSL_DEV:= devel + +$(eval $(call PKG_template,LIBPOLARSSL,libpolarssl,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBPOLARSSL_DEV,libpolarssl-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBPOLARSSL_DEV},${PKGSC_LIBPOLARSSL_DEV})) + +CONFIG_STYLE:= manual +ALL_TARGET:= no_test + +libpolarssl-install: + $(INSTALL_DIR) $(IDIR_LIBPOLARSSL)/usr/lib + $(CP) $(WRKINST)/usr/lib/libpolarssl.so* \ + $(IDIR_LIBPOLARSSL)/usr/lib + +libpolarssl-dev-install: + $(INSTALL_DIR) $(IDIR_LIBPOLARSSL_DEV)/usr/include + $(CP) $(WRKINST)/usr/include/* \ + $(IDIR_LIBPOLARSSL_DEV)/usr/include + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/polarssl/patches/patch-Makefile b/package/polarssl/patches/patch-Makefile new file mode 100644 index 000000000..b805fbf95 --- /dev/null +++ b/package/polarssl/patches/patch-Makefile @@ -0,0 +1,36 @@ +--- polarssl-1.2.8.orig/Makefile 2013-06-21 15:11:10.000000000 +0200 ++++ polarssl-1.2.8/Makefile 2013-08-15 16:10:58.555680994 +0200 +@@ -2,8 +2,6 @@ + DESTDIR=/usr/local + PREFIX=polarssl_ + +-.SILENT: +- + all: + cd library && $(MAKE) all && cd .. + cd programs && $(MAKE) all && cd .. +@@ -17,18 +15,18 @@ lib: + cd library && $(MAKE) all && cd .. + + install: +- mkdir -p $(DESTDIR)/include/polarssl +- cp -r include/polarssl $(DESTDIR)/include ++ mkdir -p $(DESTDIR)/usr/include/polarssl ++ cp -r include/polarssl $(DESTDIR)/usr/include + +- mkdir -p $(DESTDIR)/lib +- cp library/libpolarssl.* $(DESTDIR)/lib ++ mkdir -p $(DESTDIR)/usr/lib ++ cp library/libpolarssl.* $(DESTDIR)/usr/lib + +- mkdir -p $(DESTDIR)/bin ++ mkdir -p $(DESTDIR)/usr/bin + for p in programs/*/* ; do \ + if [ -x $$p ] && [ ! -d $$p ] ; \ + then \ + f=$(PREFIX)`basename $$p` ; \ +- cp $$p $(DESTDIR)/bin/$$f ; \ ++ cp $$p $(DESTDIR)/usr/bin/$$f ; \ + fi \ + done + diff --git a/package/polarssl/patches/patch-library_Makefile b/package/polarssl/patches/patch-library_Makefile new file mode 100644 index 000000000..84cc856c4 --- /dev/null +++ b/package/polarssl/patches/patch-library_Makefile @@ -0,0 +1,48 @@ +--- polarssl-1.2.8.orig/library/Makefile 2013-06-21 15:11:10.000000000 +0200 ++++ polarssl-1.2.8/library/Makefile 2013-08-15 16:12:05.261471968 +0200 +@@ -18,9 +18,7 @@ endif + # CFLAGS += -D_BSD_EXTENSION + + # To compile as a shared library: +-ifdef SHARED + CFLAGS += -fPIC +-endif + + SONAME=libpolarssl.so.0 + +@@ -51,26 +49,17 @@ OBJS= aes.o arc4.o asn1parse.o \ + ssl_tls.o timing.o version.o \ + x509parse.o x509write.o xtea.o + +-.SILENT: +- +-ifndef SHARED +-all: static +-else +-all: shared +-endif ++all: static shared + + static: libpolarssl.a + + shared: libpolarssl.$(DLEXT) + + libpolarssl.a: $(OBJS) +- echo " AR $@" + $(AR) r $@ $(OBJS) +- echo " RL $@" + $(AR) s $@ + + libpolarssl.so: libpolarssl.a +- echo " LD $@" + $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) + + libpolarssl.dylib: libpolarssl.a +@@ -82,7 +71,6 @@ libpolarssl.dll: libpolarssl.a + $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 + + .c.o: +- echo " CC $<" + $(CC) $(CFLAGS) $(OFLAGS) -c $< + + clean: diff --git a/package/polarssl/patches/patch-programs_Makefile b/package/polarssl/patches/patch-programs_Makefile new file mode 100644 index 000000000..e319dce1f --- /dev/null +++ b/package/polarssl/patches/patch-programs_Makefile @@ -0,0 +1,20 @@ +--- polarssl-1.2.8.orig/programs/Makefile 2013-06-21 15:11:10.000000000 +0200 ++++ polarssl-1.2.8/programs/Makefile 2013-08-15 16:18:39.387085302 +0200 +@@ -4,7 +4,7 @@ + # To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS + + CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement +-OFLAGS = -O2 ++#OFLAGS = -O2 + LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS) + + ifdef DEBUG +@@ -46,8 +46,6 @@ ifdef OPENSSL + APPS += test/o_p_test + endif + +-.SILENT: +- + all: $(APPS) + + aes/aescrypt2: aes/aescrypt2.c ../library/libpolarssl.a |