netpbm: add pre/post phase hooks
This commit is contained in:
parent
8ea075bcb9
commit
6b4d057b66
@ -46,6 +46,8 @@ stdenv.mkDerivation {
|
|||||||
] ++ lib.optional enableX11 libX11;
|
] ++ lib.optional enableX11 libX11;
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
runHook preConfigure
|
||||||
|
|
||||||
cp config.mk.in config.mk
|
cp config.mk.in config.mk
|
||||||
echo "STATICLIB_TOO = n" >> config.mk
|
echo "STATICLIB_TOO = n" >> config.mk
|
||||||
substituteInPlace "config.mk" \
|
substituteInPlace "config.mk" \
|
||||||
@ -57,6 +59,8 @@ stdenv.mkDerivation {
|
|||||||
echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
|
echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
|
||||||
echo "NETPBMLIBTYPE = dylib" >> config.mk
|
echo "NETPBMLIBTYPE = dylib" >> config.mk
|
||||||
echo "NETPBMLIBSUFFIX = dylib" >> config.mk
|
echo "NETPBMLIBSUFFIX = dylib" >> config.mk
|
||||||
|
|
||||||
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
@ -71,6 +75,8 @@ stdenv.mkDerivation {
|
|||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
make package pkgdir=$out
|
make package pkgdir=$out
|
||||||
|
|
||||||
rm -rf $out/link $out/*_template $out/{pkginfo,README,VERSION} $out/man/web
|
rm -rf $out/link $out/*_template $out/{pkginfo,README,VERSION} $out/man/web
|
||||||
@ -82,6 +88,8 @@ stdenv.mkDerivation {
|
|||||||
for prog in ppmquant; do
|
for prog in ppmquant; do
|
||||||
wrapProgram "$out/bin/$prog" --prefix PATH : "$out/bin"
|
wrapProgram "$out/bin/$prog" --prefix PATH : "$out/bin"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
passthru.updateScript = ./update.sh;
|
||||||
|
Loading…
Reference in New Issue
Block a user