wpa_supplicant: split wpa_gui from main package, install .desktop file and icons
svn path=/nixpkgs/trunk/; revision=27369
This commit is contained in:
parent
4157b77097
commit
4c1267546f
@ -1,17 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
tar xfvz $src
|
||||
cd $pkgname-$version/wpa_supplicant
|
||||
cp defconfig .config
|
||||
substituteInPlace Makefile --replace /usr/local $out
|
||||
make wpa_gui-qt4
|
||||
cd wpa_gui-qt4
|
||||
cd icons
|
||||
make
|
||||
ensureDir $out/share/icons
|
||||
cp -av hicolor $out/share/icons
|
||||
cd ..
|
||||
ensureDir $out/bin
|
||||
cp wpa_gui $out/bin
|
||||
ensureDir $out/share/applications
|
||||
cp wpa_gui.desktop $out/share/applications
|
@ -1,53 +1,68 @@
|
||||
{stdenv, fetchurl, openssl
|
||||
, guiSupport ? false
|
||||
, qt4}:
|
||||
|
||||
assert !guiSupport || qt4 != null;
|
||||
{stdenv, fetchurl, openssl, qt4, inkscape}:
|
||||
|
||||
let
|
||||
buildDirs = "wpa_supplicant wpa_passphrase wpa_cli";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wpa_supplicant-0.7.2";
|
||||
|
||||
version = "0.7.2";
|
||||
src = fetchurl {
|
||||
url = "http://hostap.epitest.fi/releases/${name}.tar.gz";
|
||||
url = "http://hostap.epitest.fi/releases/wpa_supplicant-${version}.tar.gz";
|
||||
sha256 = "1gnwhnczli50gidsq22ya68hixmdrhd1sxw202ygihvg6xsjl06z";
|
||||
};
|
||||
in
|
||||
|
||||
(stdenv.mkDerivation rec {
|
||||
name = "wpa_supplicant-${version}";
|
||||
inherit src;
|
||||
|
||||
preBuild = ''
|
||||
cd wpa_supplicant
|
||||
cp defconfig .config
|
||||
echo CONFIG_DEBUG_SYSLOG=y >> .config
|
||||
cp -v defconfig .config
|
||||
echo CONFIG_DEBUG_SYSLOG=y | tee -a .config
|
||||
substituteInPlace Makefile --replace /usr/local $out
|
||||
makeFlagsArray=(ALL="${buildDirs} ${if guiSupport then "wpa_gui-qt4" else ""}")
|
||||
'';
|
||||
|
||||
buildInputs = [openssl]
|
||||
++ stdenv.lib.optional guiSupport qt4;
|
||||
|
||||
# qt gui doesn't install because the executable is named differently from directory name
|
||||
# so never include wpa_gui_-qt4 in buildDirs when running make install
|
||||
preInstall = if guiSupport then ''
|
||||
makeFlagsArray=(ALL="${buildDirs}")
|
||||
'' else null;
|
||||
buildInputs = [openssl];
|
||||
|
||||
postInstall = ''
|
||||
ensureDir $out/share/man/man5 $out/share/man/man8
|
||||
cp doc/docbook/*.5 $out/share/man/man5/
|
||||
cp doc/docbook/*.8 $out/share/man/man8/
|
||||
''
|
||||
+ (if guiSupport then ''
|
||||
pwd
|
||||
cp wpa_gui-qt4/wpa_gui $out/sbin
|
||||
'' else "");
|
||||
cp -v doc/docbook/*.5 $out/share/man/man5/
|
||||
cp -v doc/docbook/*.8 $out/share/man/man8/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://hostap.epitest.fi/wpa_supplicant/;
|
||||
description = "A tool for connecting to WPA and WPA2-protected wireless networks";
|
||||
maintainers = [stdenv.lib.maintainers.marcweber];
|
||||
maintainers = with stdenv.lib.maintainers; [marcweber urkud];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}) // {
|
||||
gui = stdenv.mkDerivation {
|
||||
name = "wpa_gui-${version}";
|
||||
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ qt4 ];
|
||||
|
||||
buildNativeInputs = [ inkscape ];
|
||||
|
||||
prePatch = "cd wpa_supplicant/wpa_gui-qt4";
|
||||
|
||||
configurePhase = ''
|
||||
lrelease wpa_gui.pro
|
||||
qmake'';
|
||||
|
||||
# We do not install .xpm icons. First of all, I don't know where they should
|
||||
# be install. Second, this allows us to drop imagemagick build-time dependency.
|
||||
postBuild = ''
|
||||
sed -e '/ICONS.*xpm/d' -i icons/Makefile
|
||||
make -C icons
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/bin
|
||||
cp -v wpa_gui $out/bin
|
||||
mkdir -pv $out/share/applications
|
||||
cp -v wpa_gui.desktop $out/share/applications
|
||||
mkdir -pv $out/share/icons
|
||||
cp -av icons/hicolor $out/share/icons
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -5680,15 +5680,9 @@ let
|
||||
wirelesstools = callPackage ../os-specific/linux/wireless-tools { };
|
||||
|
||||
wpa_supplicant = callPackage ../os-specific/linux/wpa_supplicant {
|
||||
guiSupport = false;
|
||||
};
|
||||
# prebuild binaries:
|
||||
wpa_supplicant_gui = wpa_supplicant.override { guiSupport = true; };
|
||||
|
||||
# deprecated, but contains icon ? Does no longer build
|
||||
/* didn't build Sun Apr 25 20:34:18 CEST 2010
|
||||
wpa_supplicant_gui_qt4_old = callPackage ../os-specific/linux/wpa_supplicant/gui-qt4.nix { };
|
||||
*/
|
||||
wpa_supplicant_gui = pkgs.wpa_supplicant.gui;
|
||||
|
||||
xf86_input_wacom = callPackage ../os-specific/linux/xf86-input-wacom { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user