[packages/fwupd] - updated to 0.9.2 - removed outdated sh patch - added its patch (from Ubuntu) - build system has be

qboosh qboosh at pld-linux.org
Sat Jun 3 21:48:08 CEST 2017


commit bd3466ff1e9b52921751ff4a70b677de7cca7279
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jun 3 21:49:10 2017 +0200

    - updated to 0.9.2
    - removed outdated sh patch
    - added its patch (from Ubuntu)
    - build system has been switched to meson; -static is gone

 fwupd-its.patch | 65 +++++++++++++++++++++++++++++++++++++++++++++++
 fwupd-sh.patch  | 17 -------------
 fwupd.spec      | 78 +++++++++++++++++++++------------------------------------
 3 files changed, 93 insertions(+), 67 deletions(-)
---
diff --git a/fwupd.spec b/fwupd.spec
index 348d46e..39293f9 100644
--- a/fwupd.spec
+++ b/fwupd.spec
@@ -3,7 +3,6 @@
 # Conditional build:
 %bcond_without	colorhug	# ColorHug support
 %bcond_without	efi		# UEFI (and dell) support
-%bcond_without	static_libs	# static library
 %bcond_without	thunderbolt	# Thunderbolt support
 
 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ia64
@@ -12,17 +11,15 @@
 Summary:	System daemon for installing device firmware
 Summary(pl.UTF-8):	Demon systemowy do instalowania firmware'u urządzeń
 Name:		fwupd
-Version:	0.8.2
+Version:	0.9.2
 Release:	1
-License:	GPL v2
+License:	LGPL v2.1+
 Group:		Applications/System
 Source0:	https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
-# Source0-md5:	e006616f44ea1a5c53adbfd63075fa83
-Patch0:		%{name}-sh.patch
+# Source0-md5:	1e424f3d722ac4b4984cf73bd36947b8
+Patch0:		%{name}-its.patch
 URL:		https://github.com/hughsie/fwupd
 BuildRequires:	appstream-glib-devel >= 0.5.10
-BuildRequires:	autoconf >= 2.63
-BuildRequires:	automake >= 1:1.9
 %{?with_colorhug:BuildRequires:	colord-devel >= 1.2.12}
 BuildRequires:	docbook-utils
 %{?with_efi:BuildRequires:	efivar-devel}
@@ -30,7 +27,7 @@ BuildRequires:	docbook-utils
 BuildRequires:	elfutils-devel >= 0.166
 %{?with_efi:BuildRequires:	fwupdate-devel >= 5}
 BuildRequires:	gcab-devel
-BuildRequires:	gettext-tools >= 0.17
+BuildRequires:	gettext-tools >= 0.19.7
 BuildRequires:	glib2-devel >= 1:2.45.8
 BuildRequires:	gobject-introspection-devel >= 0.9.8
 BuildRequires:	gpgme-devel
@@ -44,13 +41,15 @@ BuildRequires:	libgusb-devel >= 0.2.9
 BuildRequires:	libsoup-devel >= 2.52
 # pkgconfig(libtbtfwu) >= 1
 %{?with_thunderbolt:BuildRequires:	libtbtfwu-devel >= 0-0.2017.01.19}
-BuildRequires:	libtool >= 2:2
 BuildRequires:	libxslt-progs
+BuildRequires:	meson >= 0.37.0
 BuildRequires:	pkgconfig
 BuildRequires:	polkit-devel >= 0.103
 BuildRequires:	rpmbuild(macros) >= 1.644
 BuildRequires:	sqlite3-devel >= 3
+BuildRequires:	systemd-units
 BuildRequires:	tar >= 1:1.22
+BuildRequires:	udev-devel
 BuildRequires:	udev-glib-devel
 BuildRequires:	xz
 Requires:	%{name}-libs = %{version}-%{release}
@@ -92,6 +91,7 @@ Summary(pl.UTF-8):	Pliki nagłówkowe bibliotek fwupd
 Group:		Development/Libraries
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	glib2-devel >= 1:2.45.8
+Obsoletes:	fwupd-static
 
 %description devel
 Header files for fwupd libraries.
@@ -99,18 +99,6 @@ Header files for fwupd libraries.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe bibliotek fwupd.
 
-%package static
-Summary:	Static fwupd libraries
-Summary(pl.UTF-8):	Statyczne biblioteki fwupd
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-Static fwupd libraries.
-
-%description static -l pl.UTF-8
-Statyczne biblioteki fwupd.
-
 %package apidocs
 Summary:	API documentation for fwupd libraries
 Summary(pl.UTF-8):	Dokumentacja API do bibliotek fwupd
@@ -130,33 +118,30 @@ Dokumentacja API do bibliotek fwupd.
 %patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure \
-	--disable-silent-rules \
-	%{!?with_static_libs:--disable-static} \
-	%{!?with_thunderbolt:--disable-thunderbolt} \
-	%{!?with_efi:--disable-uefi} \
-	--with-html-dir=%{_gtkdocdir} \
-	--with-systemdunitdir=%{systemdunitdir}
-%{__make}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+LDFLAGS="%{rpmldflags}" \
+meson build \
+	--buildtype=plain \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--libexecdir=%{_libexecdir} \
+	--localstatedir=%{_localstatedir} \
+	--sysconfdir=%{_sysconfdir} \
+	-Denable-tests=false \
+	%{!?with_thunderbolt:-Denable-thunderbolt=false} \
+	%{!?with_efi:-Denable-uefi=false}
+
+ninja -C build -v
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+DESTDIR=$RPM_BUILD_ROOT \
+ninja -C build -v install
 
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{dfu,fwupd}.la
-# loadable modules
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/fwupd-plugins-2/lib*.la
-%if %{with static_libs}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/fwupd-plugins-2/lib*.a
-%endif
+install -d $RPM_BUILD_ROOT%{_gtkdocdir}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
 
 %find_lang %{name}
 
@@ -238,13 +223,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/dfu.pc
 %{_pkgconfigdir}/fwupd.pc
 
-%if %{with static_libs}
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libdfu.a
-%{_libdir}/libfwupd.a
-%endif
-
 %files apidocs
 %defattr(644,root,root,755)
 %{_gtkdocdir}/libdfu
diff --git a/fwupd-its.patch b/fwupd-its.patch
new file mode 100644
index 0000000..999df1c
--- /dev/null
+++ b/fwupd-its.patch
@@ -0,0 +1,65 @@
+From 797e5672e64acd4f90cd52afca3bb192b28b4636 Mon Sep 17 00:00:00 2001
+From: Julian Liu <liu.julian at gmail.com>
+Date: Fri, 28 Apr 2017 18:09:20 +0800
+Subject: [PATCH] Add polkit's ITS files as Ubuntu doesn't not ship with it.
+
+Call msgfmt with custom_target for now as data_dir kargs for i18n.merge_file() not merged into master yet.
+(https://github.com/mesonbuild/meson/issues/1565)
+---
+ its/polkit.its     |  8 ++++++++
+ its/polkit.loc     |  6 ++++++
+ policy/meson.build | 12 ++++++++----
+ 3 files changed, 22 insertions(+), 4 deletions(-)
+ create mode 100644 its/polkit.its
+ create mode 100644 its/polkit.loc
+
+diff --git a/its/polkit.its b/its/polkit.its
+new file mode 100644
+index 0000000..1c37e6b
+--- /dev/null
++++ b/its/polkit.its
+@@ -0,0 +1,8 @@
++<?xml version="1.0"?>
++<its:rules xmlns:its="http://www.w3.org/2005/11/its"
++           version="2.0">
++  <its:translateRule selector="//*" translate="no"/>
++  <its:translateRule selector="//action/description |
++                               //action/message"
++                     translate="yes"/>
++</its:rules>
+diff --git a/its/polkit.loc b/its/polkit.loc
+new file mode 100644
+index 0000000..c7427ec
+--- /dev/null
++++ b/its/polkit.loc
+@@ -0,0 +1,6 @@
++<?xml version="1.0"?>
++<locatingRules>
++  <locatingRule name="polkit policy" pattern="*.policy">
++    <documentRule localName="policyconfig" target="polkit.its"/>
++  </locatingRule>
++</locatingRules>
+diff --git a/policy/meson.build b/policy/meson.build
+index def8976..41da2db 100644
+--- a/policy/meson.build
++++ b/policy/meson.build
+@@ -1,11 +1,15 @@
+ install_data('org.freedesktop.fwupd.rules',
+              install_dir : 'share/polkit-1/rules.d')
+ 
+-i18n.merge_file(
+-  input: 'org.freedesktop.fwupd.policy.in',
++envbin = find_program('env')
++gettext_data_dir = 'GETTEXTDATADIRS=' + meson.source_root()
++custom_target('org.freedesktop.fwupd.policy',
+   output: 'org.freedesktop.fwupd.policy',
+-  type: 'xml',
+-  po_dir: join_paths(meson.source_root(), 'po'),
++  input: 'org.freedesktop.fwupd.policy.in',
++  command: [envbin, gettext_data_dir, 'msgfmt', '--xml',
++            '--template', '@INPUT@',
++            '-d', join_paths(meson.source_root(), 'po'),
++            '-o', '@OUTPUT@'],
+   install: true,
+   install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
+ )
diff --git a/fwupd-sh.patch b/fwupd-sh.patch
deleted file mode 100644
index 180c2fe..0000000
--- a/fwupd-sh.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- fwupd-0.1.2/configure.ac.orig	2015-04-22 11:55:28.000000000 +0200
-+++ fwupd-0.1.2/configure.ac	2015-04-22 21:28:05.199909104 +0200
-@@ -138,10 +138,10 @@
- 	AC_MSG_ERROR([Cannot locate gpgme])
- else
- 	AC_MSG_RESULT([yes])
--	GPGME_CFLAGS="`\"/usr/bin/gpgme-config\" --cflags`"
--	GPGME_LIBS="`\"/usr/bin/gpgme-config\" --libs`"
--	GPGME_CFLAGS+=" `\"/usr/bin/gpg-error-config\" --cflags`"
--	GPGME_LIBS+=" `\"/usr/bin/gpg-error-config\" --libs`"
-+	GPGME_CFLAGS="$(/usr/bin/gpgme-config --cflags)"
-+	GPGME_LIBS="$(/usr/bin/gpgme-config --libs)"
-+	GPGME_CFLAGS="$GPGME_CFLAGS $(/usr/bin/gpg-error-config --cflags)"
-+	GPGME_LIBS="$GPGME_LIBS $(/usr/bin/gpg-error-config --libs)"
- 	AC_SUBST([GPGME_CFLAGS])
- 	AC_SUBST([GPGME_LIBS])
- fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fwupd.git/commitdiff/bd3466ff1e9b52921751ff4a70b677de7cca7279



More information about the pld-cvs-commit mailing list