]> git.pld-linux.org Git - packages/appstream-glib.git/commitdiff
- merged 0.3.6 from DEVEL (0.2.x left on appstream-glib-0.2 branch) auto/th/appstream-glib-0.3.6-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Apr 2015 20:30:32 +0000 (22:30 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Apr 2015 20:30:32 +0000 (22:30 +0200)
appstream-glib-rpm5.patch
appstream-glib.spec

index 109f58868d3ea26e9e195c22cf3d999974a514d9..87c269355332aba1582fc302da83acbcdd089ee5 100644 (file)
@@ -28,8 +28,8 @@
  AppStreamBuilder_1_0_gir_FILES = $(introspection_sources)
  INTROSPECTION_GIRS += AppStreamBuilder-1.0.gir
  
---- appstream-glib-0.2.6/libappstream-builder/asb-package-rpm.c.orig   2014-09-01 15:57:32.000000000 +0200
-+++ appstream-glib-0.2.6/libappstream-builder/asb-package-rpm.c        2014-09-04 16:55:26.028784594 +0200
+--- appstream-glib-0.3.4/libappstream-builder/asb-package-rpm.c.orig   2014-12-22 17:02:12.000000000 +0100
++++ appstream-glib-0.3.4/libappstream-builder/asb-package-rpm.c        2015-01-20 18:51:42.939675985 +0100
 @@ -33,7 +33,7 @@
  #include <archive.h>
  #include <archive_entry.h>
@@ -39,7 +39,7 @@
  #include <rpm/rpmts.h>
  
  #include "as-cleanup.h"
-@@ -239,6 +239,36 @@ asb_package_rpm_set_source (AsbPackage *
+@@ -225,6 +225,36 @@ asb_package_rpm_set_source (AsbPackage *
        asb_package_set_source_pkgname (pkg, srcrpm);
  }
  
 +#define       _RPMVSF_NODIGESTS (RPMVSF_NOSHA1HEADER | RPMVSF_NOMD5HEADER | RPMVSF_NOSHA1 | RPMVSF_NOMD5)
 +
  /**
-  * asb_package_rpm_ensure_simple:
+  * asb_package_rpm_ensure_nevra:
   **/
-@@ -251,7 +281,7 @@ asb_package_rpm_ensure_simple (AsbPackag
+@@ -235,7 +265,7 @@ asb_package_rpm_ensure_nevra (AsbPackage
+       AsbPackageRpmPrivate *priv = GET_PRIVATE (pkg_rpm);
        rpmtd td;
  
-       /* get the simple stuff */
 -      td = rpmtdNew ();
 +      td = malloc (sizeof (*td));
        headerGet (priv->h, RPMTAG_NAME, td, HEADERGET_MINMEM);
        asb_package_set_name (pkg, rpmtdGetString (td));
        headerGet (priv->h, RPMTAG_VERSION, td, HEADERGET_MINMEM);
-@@ -268,7 +298,7 @@ asb_package_rpm_ensure_simple (AsbPackag
-       asb_package_rpm_set_license (pkg, rpmtdGetString (td));
+@@ -246,7 +276,7 @@ asb_package_rpm_ensure_nevra (AsbPackage
+       asb_package_set_arch (pkg, rpmtdGetString (td));
+       headerGet (priv->h, RPMTAG_EPOCH, td, HEADERGET_MINMEM);
+       asb_package_set_epoch (pkg, rpmtdGetNumber (td));
+-      rpmtdFree (td);
++      free (td);
+       return TRUE;
+ }
+@@ -260,10 +290,10 @@ asb_package_rpm_ensure_source (AsbPackag
+       AsbPackageRpmPrivate *priv = GET_PRIVATE (pkg_rpm);
+       rpmtd td;
+-      td = rpmtdNew ();
++      td = malloc (sizeof (*td));
        headerGet (priv->h, RPMTAG_SOURCERPM, td, HEADERGET_MINMEM);
        asb_package_rpm_set_source (pkg, rpmtdGetString (td));
 -      rpmtdFree (td);
 +      free (td);
-       return ret;
+       return TRUE;
+ }
+@@ -277,10 +307,10 @@ asb_package_rpm_ensure_url (AsbPackage *
+       AsbPackageRpmPrivate *priv = GET_PRIVATE (pkg_rpm);
+       rpmtd td;
+-      td = rpmtdNew ();
++      td = malloc (sizeof (*td));
+       headerGet (priv->h, RPMTAG_URL, td, HEADERGET_MINMEM);
+       asb_package_set_url (pkg, rpmtdGetString (td));
+-      rpmtdFree (td);
++      free (td);
+       return TRUE;
+ }
+@@ -290,14 +320,18 @@ asb_package_rpm_ensure_url (AsbPackage *
+ static gboolean
+ asb_package_rpm_ensure_vcs (AsbPackage *pkg, GError **error)
+ {
++#ifdef RPMTAG_VCS
+       AsbPackageRpm *pkg_rpm = ASB_PACKAGE_RPM (pkg);
+       AsbPackageRpmPrivate *priv = GET_PRIVATE (pkg_rpm);
+       rpmtd td;
+-      td = rpmtdNew ();
++      td = malloc (sizeof (*td));
+       headerGet (priv->h, RPMTAG_VCS, td, HEADERGET_MINMEM);
+       asb_package_set_vcs (pkg, rpmtdGetString (td));
+       rpmtdFree (td);
++#else
++      asb_package_set_vcs (pkg, NULL);
++#endif
+       return TRUE;
+ }
+@@ -311,10 +345,10 @@ asb_package_rpm_ensure_license (AsbPacka
+       AsbPackageRpmPrivate *priv = GET_PRIVATE (pkg_rpm);
+       rpmtd td;
+-      td = rpmtdNew ();
++      td = malloc (sizeof (*td));
+       headerGet (priv->h, RPMTAG_LICENSE, td, HEADERGET_MINMEM);
+       asb_package_rpm_set_license (pkg, rpmtdGetString (td));
+-      rpmtdFree (td);
++      free (td);
+       return TRUE;
  }
  
-@@ -341,7 +371,7 @@ asb_package_rpm_ensure_releases (AsbPack
+@@ -387,7 +421,7 @@ asb_package_rpm_ensure_releases (AsbPack
  
        /* read out the file list */
        for (i = 0; i < 3; i++)
        /* get the ChangeLog info */
        headerGet (priv->h, RPMTAG_CHANGELOGTIME, td[0], HEADERGET_MINMEM);
        headerGet (priv->h, RPMTAG_CHANGELOGNAME, td[1], HEADERGET_MINMEM);
-@@ -356,7 +386,7 @@ asb_package_rpm_ensure_releases (AsbPack
+@@ -402,7 +436,7 @@ asb_package_rpm_ensure_releases (AsbPack
        }
        for (i = 0; i < 3; i++) {
                rpmtdFreeData (td[i]);
        }
        return TRUE;
  }
-@@ -378,7 +408,7 @@ asb_package_rpm_ensure_deps (AsbPackage
+@@ -424,7 +458,7 @@ asb_package_rpm_ensure_deps (AsbPackage
        _cleanup_strv_free_ gchar **deps = NULL;
  
        /* read out the dep list */
        rc = headerGet (priv->h, RPMTAG_REQUIRENAME, td, HEADERGET_MINMEM);
        if (!rc) {
                ret = FALSE;
-@@ -406,7 +436,7 @@ asb_package_rpm_ensure_deps (AsbPackage
+@@ -452,7 +486,7 @@ asb_package_rpm_ensure_deps (AsbPackage
        asb_package_set_deps (pkg, deps);
  out:
        rpmtdFreeData (td);
        return ret;
  }
  
-@@ -428,7 +458,7 @@ asb_package_rpm_ensure_filelists (AsbPac
+@@ -478,7 +512,7 @@ asb_package_rpm_ensure_filelists (AsbPac
  
        /* read out the file list */
        for (i = 0; i < 3; i++)
        rc = headerGet (priv->h, RPMTAG_DIRNAMES, td[0], HEADERGET_MINMEM);
        if (rc)
                rc = headerGet (priv->h, RPMTAG_BASENAMES, td[1], HEADERGET_MINMEM);
-@@ -463,7 +493,7 @@ asb_package_rpm_ensure_filelists (AsbPac
+@@ -513,7 +547,7 @@ asb_package_rpm_ensure_filelists (AsbPac
  out:
        for (i = 0; i < 3; i++) {
                rpmtdFreeData (td[i]);
index 582fba7484a3bc642592412f1cca2d5572dace42..4d3b845d4f238a52e6ebc8a18acf1e93b334d425 100644 (file)
@@ -1,15 +1,21 @@
+#
+# Conditional build:
+%bcond_without ostree  # ostree support
+%bcond_with    alpm    # Arch Linux PacMan support
+#
 Summary:       GLib Objects and helper methods for reading and writing AppStream metadata
 Summary(pl.UTF-8):     Obiekty GLiba i metody pomocnicze do odczytu i zapisu metadanych AppStream
 Name:          appstream-glib
-Version:       0.2.8
-Release:       3
+Version:       0.3.6
+Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       http://people.freedesktop.org/~hughsient/appstream-glib/releases/%{name}-%{version}.tar.xz
-# Source0-md5: 6c3f40696411945dee67d3a1b411c2a4
+# Source0-md5: 854085e5216120b9843d680e97f1fb63
 Patch0:                %{name}-rpm5.patch
 Patch1:                %{name}-pc.patch
 URL:           http://people.freedesktop.org/~hughsient/appstream-glib/
+%{?with_alpm:BuildRequires:    alpm-devel}
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1:1.9
 BuildRequires: docbook-dtd43-xml
@@ -17,6 +23,7 @@ BuildRequires:        docbook-style-xsl
 BuildRequires: fontconfig-devel
 # pkgconfig(freetype2) >= 9.10.0
 BuildRequires: freetype-devel >= 1:2.2.1
+BuildRequires: gcab
 BuildRequires: gdk-pixbuf2-devel >= 2.14
 BuildRequires: gettext-tools >= 0.17
 BuildRequires: glib2-devel >= 1:2.16.1
@@ -30,15 +37,19 @@ BuildRequires:      libsoup-devel >= 2.24
 BuildRequires: libstdc++-devel
 BuildRequires: libtool >= 2:2
 BuildRequires: libxslt-progs
+%{?with_ostree:BuildRequires:  ostree-devel >= 2015.1}
 BuildRequires: pango-devel
 BuildRequires: pkgconfig
 BuildRequires: rpm-devel >= 4.5
-BuildRequires: sqlite3-devel
+BuildRequires: sqlite3-devel >= 3
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
+BuildRequires: yaml-devel
 Requires:      glib2 >= 1:2.16.1
 Requires:      gdk-pixbuf2 >= 2.14
 Requires:      libsoup >= 2.24
+Provides:      appdata-tools = %{version}
+Obsoletes:     appdata-tools < 0.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -166,6 +177,8 @@ Bashowe dopeÅ‚nianie skÅ‚adni polecenia appstream-builder.
 %{__autoheader}
 %{__automake}
 %configure \
+       %{?with_alpm:--enable-alpm} \
+       %{!?with_ostree:--disable-ostree} \
        --disable-silent-rules \
        --with-html-dir=%{_gtkdocdir}
 %{__make}
@@ -195,10 +208,12 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS MAINTAINERS NEWS README.md
+%attr(755,root,root) %{_bindir}/appdata-validate
 %attr(755,root,root) %{_bindir}/appstream-util
 %attr(755,root,root) %{_libdir}/libappstream-glib.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libappstream-glib.so.1
+%attr(755,root,root) %ghost %{_libdir}/libappstream-glib.so.7
 %{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib
+%{_aclocaldir}/appdata-xml.m4
 %{_mandir}/man1/appstream-util.1*
 
 %files devel
@@ -225,7 +240,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/appstream-builder
 %attr(755,root,root) %{_libdir}/libappstream-builder.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libappstream-builder.so.1
+%attr(755,root,root) %ghost %{_libdir}/libappstream-builder.so.7
 %{_libdir}/girepository-1.0/AppStreamBuilder-1.0.typelib
 %dir %{_libdir}/asb-plugins
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_absorb.so
@@ -233,6 +248,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_blacklist.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_dbus.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_desktop.so
+%attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_firmware.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_font.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_gettext.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_gir.so
@@ -245,6 +261,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_kde_services.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_metainfo.so
 %attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_nm.so
+%if %{with ostree}
+%attr(755,root,root) %{_libdir}/asb-plugins/libasb_plugin_ostree.so
+%endif
 %{_mandir}/man1/appstream-builder.1*
 
 %files -n appstream-builder-devel
This page took 0.280733 seconds and 4 git commands to generate.