forked from mirrors/nixpkgs
apparmor: use standard phase hooks
This commit is contained in:
parent
1dd8dd4ca8
commit
ed5f6be317
1 changed files with 18 additions and 45 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, perl, which
|
{ stdenv, fetchurl, autoconf, autoreconfHook, automake, libtool, pkgconfig, perl, which
|
||||||
, glibc, flex, bison, python27, swig, pam
|
, glibc, flex, bison, python27, swig, pam
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ let
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
|
autoreconfHook
|
||||||
bison
|
bison
|
||||||
flex
|
flex
|
||||||
glibc
|
glibc
|
||||||
|
@ -44,21 +45,16 @@ let
|
||||||
which
|
which
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# required to build apparmor-parser
|
||||||
|
dontDisableStatic = true;
|
||||||
|
|
||||||
prePatch = prePatchCommon + ''
|
prePatch = prePatchCommon + ''
|
||||||
substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h"
|
substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h"
|
||||||
substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h"
|
substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
postPatch = "cd ./libraries/libapparmor";
|
||||||
cd ./libraries/libapparmor
|
configureFlags = "--with-python --with-perl";
|
||||||
./autogen.sh
|
|
||||||
./configure --prefix="$out" --with-python --with-perl
|
|
||||||
make
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = apparmor-meta "library";
|
meta = apparmor-meta "library";
|
||||||
};
|
};
|
||||||
|
@ -74,15 +70,9 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = prePatchCommon;
|
prePatch = prePatchCommon;
|
||||||
|
postPatch = "cd ./utils";
|
||||||
buildPhase = ''
|
makeFlags = ''LANGS='';
|
||||||
cd ./utils
|
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin VIM_INSTALL_PATH=$(out)/share PYPREFIX='';
|
||||||
make LANGS=""
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install LANGS="" DESTDIR="$out" BINDIR="$out/bin" VIM_INSTALL_PATH="$out/share" PYPREFIX=""
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = apparmor-meta "user-land utilities";
|
meta = apparmor-meta "user-land utilities";
|
||||||
};
|
};
|
||||||
|
@ -105,15 +95,9 @@ let
|
||||||
## techdoc.pdf still doesn't build ...
|
## techdoc.pdf still doesn't build ...
|
||||||
substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages"
|
substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages"
|
||||||
'';
|
'';
|
||||||
|
postPatch = "cd ./parser";
|
||||||
buildPhase = ''
|
makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include'';
|
||||||
cd ./parser
|
installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
|
||||||
make LANGS="" USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install LANGS="" USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include DESTDIR="$out" DISTRO="unknown"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = apparmor-meta "rule parser";
|
meta = apparmor-meta "rule parser";
|
||||||
};
|
};
|
||||||
|
@ -129,14 +113,9 @@ let
|
||||||
which
|
which
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
postPatch = "cd ./changehat/pam_apparmor";
|
||||||
cd ./changehat/pam_apparmor
|
makeFlags = ''USE_SYSTEM=1'';
|
||||||
make USE_SYSTEM=1
|
installFlags = ''DESTDIR=$(out)'';
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install DESTDIR="$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = apparmor-meta "PAM service";
|
meta = apparmor-meta "PAM service";
|
||||||
};
|
};
|
||||||
|
@ -147,14 +126,8 @@ let
|
||||||
|
|
||||||
buildInputs = [ which ];
|
buildInputs = [ which ];
|
||||||
|
|
||||||
buildPhase = ''
|
postPatch = "cd ./profiles";
|
||||||
cd ./profiles
|
installFlags = ''DESTDIR=$(out) EXTRAS_DEST=$(out)/share/apparmor/extra-profiles'';
|
||||||
make
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install DESTDIR="$out" EXTRAS_DEST="$out/share/apparmor/extra-profiles"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = apparmor-meta "profiles";
|
meta = apparmor-meta "profiles";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue