apg: 2.3.0b -> unstable-2015-01-29

Also switch to newer maintained upstream.
launchpad/nixpkgs/master
Jörg Thalheim 3 years ago
parent f9736306b9
commit 8a653e7cf8
  1. 44
      pkgs/tools/security/apg/apg.patch
  2. 27
      pkgs/tools/security/apg/default.nix
  3. 11
      pkgs/tools/security/apg/phony-install-target.patch

@ -1,44 +0,0 @@
diff -rc apg-2.2.3/Makefile apg-2.2.3-new/Makefile
*** apg-2.2.3/Makefile 2003-08-07 17:40:30.000000000 +0200
--- apg-2.2.3-new/Makefile 2013-07-24 12:25:31.159938436 +0200
***************
*** 113,131 ****
if test -x ./apg; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
if test -x ./apgd; then \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
fi
if test -x ./apgbfm; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
--- 113,131 ----
if test -x ./apg; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
! ./install-sh -c -m 0755 ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
if test -x ./apgd; then \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
! ./install-sh -c -m 0755 ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
fi
if test -x ./apgbfm; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
! ./install-sh -c -m 0755 ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi

@ -1,25 +1,18 @@
{ lib, stdenv, fetchurl, openssl }:
{ lib, stdenv, fetchFromGitHub, openssl, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "apg";
version = "2.3.0b";
version = "unstable-2015-01-29";
src = fetchurl {
url = "http://www.adel.nursat.kz/apg/download/apg-${version}.tar.gz";
sha256 = "14lbq81xrcsmpk1b9qmqyz7n6ypf08zcxvcvp6f7ybcyf0lj1rfi";
src = fetchFromGitHub {
owner = "wilx";
repo = "apg";
rev = "7ecdbac79156c8864fa3ff8d61e9f1eb264e56c2";
sha256 = "sha256-+7TrJACdm/i/pc0dsp8edEIOjx8cip+x0Qc2gONajSE=";
};
configurePhase = ''
substituteInPlace Makefile --replace /usr/local "$out"
'';
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc"];
patches = [
./apg.patch
./phony-install-target.patch
];
nativeBuildInputs = [ autoreconfHook ];
postPatch = lib.optionalString stdenv.isDarwin ''
sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile
'';
buildInputs = [ openssl ];
meta = {
description = "Tools for random password generation";
@ -66,7 +59,7 @@ stdenv.mkDerivation rec {
* Ability to enforce remote users to use only allowed type of
password generation
'';
homepage = "http://www.adel.nursat.kz/apg/";
homepage = "https://github.com/wilx/apg";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ astsmtl ];
platforms = lib.platforms.unix;

@ -1,11 +0,0 @@
diff -ur a/Makefile b/Makefile
--- a/Makefile 2003-08-08 00:40:39.000000000 +0900
+++ b/Makefile 2018-04-05 22:29:39.284191020 +0900
@@ -142,6 +142,7 @@
strip ${CS_PROGNAME}
strip ${BFM_PROGNAME}
+.PHONY: install
install:
if test -x ./apg; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
Loading…
Cancel
Save