fwupd: bump

This commit is contained in:
Shea Levy 2017-09-02 20:00:20 -04:00
parent eedffc5277
commit 35f89413e2
6 changed files with 158 additions and 37 deletions

@ -1,25 +1,25 @@
{ stdenv, fetchFromGitHub, pkgconfig, gettext, gtk3, intltool, glib
, gtk_doc, autoconf, automake, libtool, libarchive, libyaml
, gtk_doc, autoconf, automake, libtool, libarchive
, gobjectIntrospection, sqlite, libsoup, gcab, attr, acl, docbook_xsl
, libuuid, json_glib, autoconf-archive, gperf
, libuuid, json_glib, autoconf-archive, meson, gperf, ninja
}:
stdenv.mkDerivation rec {
name = "appstream-glib-0.6.13";
name = "appstream-glib-0.7.2";
src = fetchFromGitHub {
owner = "hughsie";
repo = "appstream-glib";
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
sha256 = "1csscszdp1imd0hiib6xx7mfylfl1r64xmma14p5jq1yprprpa9h";
sha256 = "1jvwfida12d2snc8p9lpbpqzrixw2naaiwfmsrldwkrxsj3i19pl";
};
nativeBuildInputs = [ autoconf automake libtool pkgconfig intltool autoconf-archive ];
nativeBuildInputs = [ meson pkgconfig ninja ];
buildInputs = [ glib gtk_doc gettext sqlite libsoup
gcab attr acl docbook_xsl libuuid json_glib
libarchive libyaml gobjectIntrospection gperf ];
libarchive gobjectIntrospection gperf ];
propagatedBuildInputs = [ gtk3 ];
configureScript = "./autogen.sh";
mesonFlags = [ "-Denable-rpm=false" "-Denable-stemmer=false" "-Denable-dep11=false" ];
meta = with stdenv.lib; {
description = "Objects and helper methods to read and write AppStream metadata";

@ -1,35 +1,53 @@
{ stdenv, fetchurl, gtk_doc, pkgconfig, gobjectIntrospection, intltool
, libgudev, polkit, gcab, appstream-glib, gusb, sqlite, libarchive
, libgudev, polkit, appstream-glib, gusb, sqlite, libarchive
, libsoup, docbook2x, gpgme, libxslt, libelf, libsmbios, efivar
, fwupdate, libgpgerror, libyaml, valgrind
, fwupdate, libgpgerror, libyaml, valgrind, meson, libuuid, pygobject3
, pillow, ninja, gcab, makeWrapper, glib, gdk_pixbuf
}:
let version = "0.8.1"; in
let version = "0.9.6";
rpath = stdenv.lib.makeLibraryPath
[ libuuid.out
appstream-glib
glib
libsoup
gdk_pixbuf
libarchive.lib
gcab
sqlite.out
gusb
polkit.out
gpgme
libgpgerror
libelf
efivar
libsmbios
fwupdate
libgudev
"$out"
];
in
stdenv.mkDerivation
{ name = "fwupd-${version}";
src = fetchurl
{ url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
sha256 = "0sq0aay5d6b0vgr7j7y4i58flbxmcbpwyw6vfwrd29fim21j6ac8";
sha256 = "0h3y4ygckvkjdx7yxwbm273iv84yk37ivlcf4xvq95g64vs8gfhf";
};
buildInputs =
[ gtk_doc pkgconfig gobjectIntrospection intltool libgudev
polkit gcab appstream-glib gusb sqlite libarchive libsoup
polkit appstream-glib gusb sqlite libarchive libsoup
docbook2x libxslt libelf libsmbios fwupdate libyaml valgrind
meson gpgme libuuid pygobject3 pillow ninja gcab makeWrapper
];
patches = [ ./localstatedir-check-perms.patch ];
postPatch = ''
sed -i -e \
's|/usr/bin/gpgme-config|${gpgme.dev}/bin/gpgme-config|' -e \
's|/usr/bin/gpg-error-config|${libgpgerror.dev}/bin/gpg-error-config|' \
./configure
'';
patches = [ ./fix-missing-deps.patch ];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${efivar}/include/efivar"
'';
configureFlags =
[ "--with-systemdunitdir=$(out)/lib/systemd/system"
"--with-udevrulesdir=$(out)/lib/udev/rules.d"
"--localstatedir=/var"
];
mesonFlags = [ "-Denable-colorhug=false" "-Denable-man=false" "-Denable-tests=false" "--localstatedir=/var" "-Denable-doc=false" "-Dwith-bootdir=/boot" ];
postFixup = ''
for prog in $out/bin/* $out/libexec/fwupd/*; do
wrapProgram "$prog" --prefix LD_LIBRARY_PATH : ${rpath}
done
'';
enableParallelBuilding = true;
meta =
{ license = [ stdenv.lib.licenses.gpl2 ];

@ -0,0 +1,114 @@
diff -Naur fwupd-0.9.6-orig/data/meson.build fwupd-0.9.6/data/meson.build
--- fwupd-0.9.6-orig/data/meson.build 2017-08-03 05:45:02.000000000 -0400
+++ fwupd-0.9.6/data/meson.build 2017-09-02 19:58:37.324596487 -0400
@@ -20,7 +20,7 @@
)
install_data(['90-fwupd-devices.rules'],
- install_dir : join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d')
+ install_dir : join_paths(get_option('prefix'), 'lib', 'udev', 'rules.d')
)
con2 = configuration_data()
@@ -52,7 +52,7 @@
output : 'fwupd-offline-update.service',
configuration : con2,
install: true,
- install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
+ install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system'),
)
endif
@@ -63,6 +63,6 @@
output : 'fwupd.service',
configuration : con2,
install: true,
- install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
+ install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system'),
)
endif
diff -Naur fwupd-0.9.6-orig/libdfu/meson.build fwupd-0.9.6/libdfu/meson.build
--- fwupd-0.9.6-orig/libdfu/meson.build 2017-08-03 05:45:02.000000000 -0400
+++ fwupd-0.9.6/libdfu/meson.build 2017-09-02 19:58:37.325596508 -0400
@@ -23,6 +23,10 @@
giounix,
libm,
gusb,
+ uuid,
+ libarchive,
+ soup,
+ libgcab
]
if get_option('enable-libelf')
diff -Naur fwupd-0.9.6-orig/meson.build fwupd-0.9.6/meson.build
--- fwupd-0.9.6-orig/meson.build 2017-08-03 05:45:02.000000000 -0400
+++ fwupd-0.9.6/meson.build 2017-09-02 19:59:07.406216716 -0400
@@ -124,6 +124,7 @@
if polkit.version().version_compare('>= 0.114')
conf.set('HAVE_POLKIT_0_114', '1')
endif
+libgcab = dependency('libgcab-1.0')
gudev = dependency('gudev-1.0')
appstream_glib = dependency('appstream-glib', version : '>= 0.6.9')
gusb = dependency('gusb', version : '>= 0.2.9')
@@ -200,7 +201,7 @@
'fwupd-plugins-2')
conf.set_quoted('PLUGINDIR', plugin_dir)
-conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
+conf.set_quoted('SYSCONFDIR', '/etc')
conf.set_quoted('BINDIR',
join_paths(get_option('prefix'),
get_option('bindir')))
@@ -227,6 +228,9 @@
plugin_deps += gmodule
plugin_deps += gusb
plugin_deps += soup
+plugin_deps += libarchive
+plugin_deps += uuid
+plugin_deps += libgcab
subdir('data')
subdir('docs')
@@ -255,6 +259,3 @@
endif
endif
-if get_option('enable-systemd')
- meson.add_install_script('meson_post_install.sh', systemd.get_pkgconfig_variable('systemdsystemunitdir'), localstatedir)
-endif
diff -Naur fwupd-0.9.6-orig/po/make-images.sh fwupd-0.9.6/po/make-images.sh
--- fwupd-0.9.6-orig/po/make-images.sh 2017-08-03 05:45:02.000000000 -0400
+++ fwupd-0.9.6/po/make-images.sh 2017-09-02 19:58:37.328596570 -0400
@@ -7,6 +7,7 @@
#
install -m 0755 -d ${MESON_INSTALL_DESTDIR_PREFIX}/share/locale/
${MESON_SOURCE_ROOT}/po/make-images "Installing firmware update…" ${MESON_INSTALL_DESTDIR_PREFIX}/share/locale/ ${MESON_SOURCE_ROOT}/po/LINGUAS
+shopt -s nullglob
for x in ${MESON_INSTALL_DESTDIR_PREFIX}/share/locale/*/LC_IMAGES/*.bmp ; do
gzip -f ${x}
done
diff -Naur fwupd-0.9.6-orig/src/meson.build fwupd-0.9.6/src/meson.build
--- fwupd-0.9.6-orig/src/meson.build 2017-08-03 05:45:02.000000000 -0400
+++ fwupd-0.9.6/src/meson.build 2017-09-02 19:58:37.329596590 -0400
@@ -24,6 +24,9 @@
polkit,
soup,
sqlite,
+ uuid,
+ libarchive,
+ libgcab
],
link_with : fwupd,
c_args : [
@@ -73,6 +76,9 @@
gpgme,
gpgerror,
valgrind,
+ uuid,
+ libarchive,
+ libgcab
],
link_with : fwupd,
c_args : [

@ -1,12 +0,0 @@
diff -Naur fwupd-0.8.1-orig/src/Makefile.in fwupd-0.8.1/src/Makefile.in
--- fwupd-0.8.1-orig/src/Makefile.in 2017-02-24 02:59:23.000000000 -0500
+++ fwupd-0.8.1/src/Makefile.in 2017-02-27 15:06:56.218901891 -0500
@@ -1639,7 +1639,7 @@
$(srcdir)/fwupd.gresource.xml
install-data-hook:
- if test -w $(DESTDIR)$(prefix)/; then \
+ if test -w $$(dirname $(DESTDIR)$(localstatedir)/); then \
mkdir -p $(DESTDIR)$(localstatedir)/lib/fwupd; \
chmod 0755 $(DESTDIR)$(localstatedir)/lib/fwupd; \
mkdir -p $(DESTDIR)$(localstatedir)/cache/app-info/xmls; \

@ -23,6 +23,7 @@ let version = "8"; in
linux/libfwup.c
sed -i 's|/usr/share|$(prefix)share|' linux/Makefile
sed -i "s|/usr/include|$out/include|" linux/fwup.pc.in
find . -type f -print0 | xargs -0 sed -i -e 's|/boot/efi|/boot|g' -e 's|/boot/efi/EFI|/boot/EFI|g'
'';
configurePhase = ''
arch=$(cc -dumpmachine | cut -f1 -d- | sed 's,i[3456789]86,ia32,' )

@ -11963,7 +11963,7 @@ with pkgs;
dstat = callPackage ../os-specific/linux/dstat { };
fwupd = callPackage ../os-specific/linux/firmware/fwupd { inherit (gnome2) gtk_doc; };
fwupd = callPackage ../os-specific/linux/firmware/fwupd { inherit (gnome2) gtk_doc; inherit (python3Packages) pygobject3 pillow; };
fwupdate = callPackage ../os-specific/linux/firmware/fwupdate { };