summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--make-openssl.patch33
-rw-r--r--makefile.patch49
4 files changed, 54 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c214f8f979d6..4542ea6c814e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = secpwgen
pkgdesc = Secure password generator
pkgver = 1.3
- pkgrel = 4
+ pkgrel = 5
url = http://zvrba.net/
arch = x86_64
license = MIT
depends = openssl
source = https://github.com/itoffshore/secpwgen/archive/v1.3.tar.gz
- source = make-openssl.patch
+ source = makefile.patch
sha512sums = a18b5405ae5f6a62c25dd61654ea897b2f099fa459530bc6cfdbe79d96bfa6b4943e4ba2456ad5355d37cababe585299638afe56ff1a9fc649b6df0b7aa1e269
sha512sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 6a2989ea3660..25270ecc20cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,20 +4,20 @@
pkgname=secpwgen
pkgver=1.3
-pkgrel=4
+pkgrel=5
pkgdesc="Secure password generator"
url='http://zvrba.net/'
arch=('x86_64')
license=('MIT')
depends=('openssl')
source=("https://github.com/itoffshore/$pkgname/archive/v$pkgver.tar.gz"
- "make-openssl.patch")
+ "makefile.patch")
sha512sums=('a18b5405ae5f6a62c25dd61654ea897b2f099fa459530bc6cfdbe79d96bfa6b4943e4ba2456ad5355d37cababe585299638afe56ff1a9fc649b6df0b7aa1e269'
'SKIP')
prepare() {
cd ${pkgname}-${pkgver}
- patch -p1 < "${srcdir}/make-openssl.patch"
+ patch Makefile.proto < "${srcdir}/makefile.patch"
}
build() {
diff --git a/make-openssl.patch b/make-openssl.patch
deleted file mode 100644
index 3f2fa14ccb3d..000000000000
--- a/make-openssl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- secpwgen-1.3/Makefile.proto 2015-07-21 20:15:10.000000000 +0000
-+++ secpwgen-1.3/Makefile.proto.new 2015-07-21 22:03:47.511905311 +0000
-@@ -30,9 +30,9 @@
- ##
- # If using OpenSSL, uncomment the following 3 lines.
- ##
--#CRYPTO_CFLAGS =
--#CRYPTO_OBJS = secure_random_openssl.o
--#CRYPTO_LIBS = -lcrypto
-+CRYPTO_CFLAGS =
-+CRYPTO_OBJS = secure_random_openssl.o
-+CRYPTO_LIBS = -lcrypto
-
- ##
- # If using cryptlib, uncomment the following 3 lines.
-@@ -45,7 +45,7 @@
- # Change PREFIX to install to different directories. The binary is installed
- # in $PREFIX/bin, and the man in $PREFIX/man/man1
- ##
--PREFIX = /usr/local
-+PREFIX = /usr
-
- ##
- # On some operating systems (most notably Linux 2.6 kernels) using mlockall
-@@ -60,7 +60,7 @@ PREFIX = /usr/local
- # Sometimes you have only dynamic libraries available. In that case COMMENT
- # the following line.
- ##
--LINK_STATIC = -static
-+#LINK_STATIC = -static
-
- ##############################################################################
- # NO USER MODIFIABLE PARTS AFTER THIS POINT \ No newline at end of file
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 000000000000..3786b0a36cd7
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,49 @@
+--- Makefile.proto 2015-07-21 23:15:10.000000000 +0300
++++ Makefile 2019-05-09 20:08:49.139698846 +0300
+@@ -31,8 +31,8 @@
+ # If using OpenSSL, uncomment the following 3 lines.
+ ##
+ #CRYPTO_CFLAGS =
+-#CRYPTO_OBJS = secure_random_openssl.o
+-#CRYPTO_LIBS = -lcrypto
++CRYPTO_OBJS = secure_random_openssl.o
++CRYPTO_LIBS = -lcrypto
+
+ ##
+ # If using cryptlib, uncomment the following 3 lines.
+@@ -45,7 +45,7 @@
+ # Change PREFIX to install to different directories. The binary is installed
+ # in $PREFIX/bin, and the man in $PREFIX/man/man1
+ ##
+-PREFIX = /usr/local
++PREFIX ?= /usr
+
+ ##
+ # On some operating systems (most notably Linux 2.6 kernels) using mlockall
+@@ -60,12 +60,13 @@
+ # Sometimes you have only dynamic libraries available. In that case COMMENT
+ # the following line.
+ ##
+-LINK_STATIC = -static
++#LINK_STATIC = -static
+
+ ##############################################################################
+ # NO USER MODIFIABLE PARTS AFTER THIS POINT
+ ##############################################################################
+-CFLAGS = -Wall $(CRYPTO_INCLUDE_PATH) $(CRYPTO_CFLAGS) $(NO_MLOCKALL)
++CFLAGS := ${CFLAGS} -Wall $(CRYPTO_INCLUDE_PATH) $(CRYPTO_CFLAGS) $(NO_MLOCKALL)
++#LDFLAGS on my system results in libcrypto catching SIGSEGV
+ LDFLAGS = $(CRYPTO_LIBRARY_PATH) $(LINK_STATIC) $(CRYPTO_LIBS) -lm
+
+ .PHONY : all install-strip install clean
+@@ -75,8 +76,9 @@
+
+ all: secpwgen
+
++#libcrypto catches SIGSEGV if linked with cc.
+ secpwgen: $(OBJS)
+- $(CC) -o $@ $(OBJS) $(LDFLAGS)
++ $(CXX) -o $@ $(OBJS) $(LDFLAGS)
+
+ install-strip: secpwgen
+ strip secpwgen