udisks: avoid autoreconf

svn path=/nixpkgs/branches/stdenv-updates/; revision=32720
This commit is contained in:
Yury G. Kudryashov 2012-03-01 15:09:53 +00:00
parent 92f1b06907
commit 1ef47d19ce
3 changed files with 15 additions and 39 deletions

View File

@ -1,7 +1,6 @@
{ stdenv, fetchurl, pkgconfig, sg3_utils, udev, glib, dbus, dbus_glib
, polkit, parted, lvm2, libatasmart, intltool, libuuid, mdadm
, libxslt, docbook_xsl, utillinux
, automake, autoconf, libtool, gtkdoc }:
, libxslt, docbook_xsl, utillinux }:
stdenv.mkDerivation rec {
name = "udisks-1.0.4";
@ -11,33 +10,29 @@ stdenv.mkDerivation rec {
sha256 = "1xgqifddwaavmjc8c30i0mdffyirsld7c6qhfyjw7f9khwv8jjw5";
};
# Move 80-udisks.rules manually to make the patch smaller
prePatch = "mv -v data/80-udisks.rules{,.in}";
# Not written a patch that can be accepted upstream yet
postPatch = "sed -e 's@/sbin/mdadm@${mdadm}&@' -i data/80-udisks.rules.in";
patches = [ ./purity.patch ];
postPatch =
''
sed -e 's,/sbin/mdadm,${mdadm}&,g' -e "s,@slashlibdir@,$out/lib,g" -i data/80-udisks.rules
substituteInPlace src/main.c --replace \
"/sbin:/bin:/usr/sbin:/usr/bin" \
"${utillinux}/bin:${mdadm}/sbin:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin"
'';
buildInputs =
[ sg3_utils udev glib dbus dbus_glib polkit parted
lvm2 libatasmart intltool libuuid libxslt docbook_xsl
];
buildNativeInputs = [ automake autoconf libtool gtkdoc pkgconfig ];
buildNativeInputs = [ pkgconfig ];
configureFlags = "--localstatedir=/var --enable-lvm2";
preConfigure =
''
# Ensure that udisks can find the necessary programs.
substituteInPlace src/main.c --replace \
"/sbin:/bin:/usr/sbin:/usr/bin" \
"${utillinux}/bin:${mdadm}/sbin:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin"
# The patch above modifies Makefile.am, so redo the whole thing.
# FIXME: Remove that ASAP---e.g., by writing the patch differently.
autoreconf -vfi
'';
meta = {

View File

@ -1,7 +1,7 @@
diff --git a/data/80-udisks.rules.in b/data/80-udisks.rules.in
diff --git a/data/80-udisks.rules b/data/80-udisks.rules
index 6720394..60b67ed 100644
--- a/data/80-udisks.rules.in
+++ b/data/80-udisks.rules.in
--- a/data/80-udisks.rules
+++ b/data/80-udisks.rules
@@ -23,7 +23,7 @@ LABEL="ata_port_cardbus_end"
# this is the case we can trigger a 'change' on the sas_expander device
# when the bsg device appears)
@ -55,20 +55,3 @@ index 6720394..60b67ed 100644
# Example rule for tagging a device with a specific media type. Where and
diff --git a/data/Makefile.am b/data/Makefile.am
index ca6d8ac..ed9faa3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -25,7 +25,11 @@ $(dbusconf_DATA): $(dbusconf_in_files) Makefile
cp $< $@
udevrulesdir = $(slashlibdir)/udev/rules.d
-udevrules_DATA = 80-udisks.rules
+udevrules_in_files = 80-udisks.rules.in
+udevrules_DATA = $(udevrules_in_files:.rules.in=.rules)
+
+$(udevrules_DATA): $(udevrules_in_files) Makefile
+ @sed -e "s|\@slashlibdir\@|$(slashlibdir)|g" $< > $@
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = udisks.pc

View File

@ -5983,9 +5983,7 @@ let
udev173 = callPackage ../os-specific/linux/udev/173.nix { };
udev = pkgs.udev173;
udisks = callPackage ../os-specific/linux/udisks {
inherit (gnome) gtkdoc;
};
udisks = callPackage ../os-specific/linux/udisks { };
uml = linux.override {
userModeLinux = true;