summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/tests/Makefile.am8
-rw-r--r--data/tests/app-1-1.fc21.x86_64.rpmbin0 -> 13420 bytes
-rw-r--r--data/tests/app-extra-1-1.fc21.noarch.rpmbin0 -> 6636 bytes
-rw-r--r--data/tests/app.spec71
-rw-r--r--data/tests/rpmbuild/README1
-rw-r--r--data/tests/rpmbuild/app-demo.desktop8
-rw-r--r--data/tests/rpmbuild/app-extra.metainfo.xml10
-rw-r--r--data/tests/rpmbuild/app.appdata.xml14
-rw-r--r--data/tests/rpmbuild/app.c16
-rw-r--r--data/tests/rpmbuild/app.desktop9
-rw-r--r--data/tests/rpmbuild/app.gir7
-rw-r--r--data/tests/rpmbuild/app.metainfo.xml10
-rw-r--r--data/tests/rpmbuild/app.notifyrc3
-rw-r--r--data/tests/rpmbuild/app.pngbin0 -> 146 bytes
-rw-r--r--data/tests/rpmbuild/app.service3
-rwxr-xr-xdata/tests/rpmbuild/build.sh4
-rw-r--r--data/tests/rpmbuild/en_GB.po25
-rw-r--r--data/tests/rpmbuild/index.page6
-rw-r--r--data/tests/rpmbuild/ru.po9
-rw-r--r--data/tests/rpmbuild/search-provider.ini3
-rw-r--r--data/tests/test-0.1-1.fc21.noarch.rpmbin0 -> 6352 bytes
-rw-r--r--data/tests/test.spec25
22 files changed, 232 insertions, 0 deletions
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
index bb8f3e7..0b3e091 100644
--- a/data/tests/Makefile.am
+++ b/data/tests/Makefile.am
@@ -4,6 +4,8 @@ test_files = \
alpha-internal1.png \
alpha-internal2.png \
alpha-vert.png \
+ app-1-1.fc21.x86_64.rpm \
+ app-extra-1-1.fc21.noarch.rpm \
broken.appdata.xml \
example.desktop \
example.metainfo.xml \
@@ -14,6 +16,7 @@ test_files = \
screenshot.png \
ss-small.png \
success.appdata.xml \
+ test-0.1-1.fc21.noarch.rpm \
translated.appdata.xml \
usr/share/appdata/broken.appdata.xml \
usr/share/app-install/desktop/test.desktop \
@@ -22,6 +25,11 @@ test_files = \
usr/share/pixmaps/test.png \
validate.xml.gz
+CLEANFILES = \
+ rpmbuild/app.bin \
+ rpmbuild/en_GB.mo \
+ rpmbuild/ru.mo
+
EXTRA_DIST = $(test_files)
-include $(top_srcdir)/git.mk
diff --git a/data/tests/app-1-1.fc21.x86_64.rpm b/data/tests/app-1-1.fc21.x86_64.rpm
new file mode 100644
index 0000000..4abbeee
--- /dev/null
+++ b/data/tests/app-1-1.fc21.x86_64.rpm
Binary files differ
diff --git a/data/tests/app-extra-1-1.fc21.noarch.rpm b/data/tests/app-extra-1-1.fc21.noarch.rpm
new file mode 100644
index 0000000..fb55c28
--- /dev/null
+++ b/data/tests/app-extra-1-1.fc21.noarch.rpm
Binary files differ
diff --git a/data/tests/app.spec b/data/tests/app.spec
new file mode 100644
index 0000000..bbd5fe3
--- /dev/null
+++ b/data/tests/app.spec
@@ -0,0 +1,71 @@
+Summary: A test application
+Name: app
+Version: 1
+Release: 1%{?dist}
+URL: http://people.freedesktop.org/
+License: GPLv2+
+Source0: README
+Source1: app.desktop
+Source2: app.png
+Source3: app.appdata.xml
+Source4: search-provider.ini
+Source5: index.page
+Source6: app-demo.desktop
+Source7: app.service
+Source8: app.metainfo.xml
+Source9: app-extra.metainfo.xml
+Source10: app.gir
+Source11: en_GB.mo
+Source12: ru.mo
+Source13: app.notifyrc
+Source14: app.bin
+
+%description
+This is a test application.
+
+%package extra
+Summary: Extra plugins for app
+Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildArch: noarch
+
+%description extra
+Extra plugins to provide new functionality for app.
+
+%install
+install -Dp %{SOURCE0} $RPM_BUILD_ROOT/%{_datadir}/%{name}-%{version}/README
+install -Dp %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/app.desktop
+install -Dp %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/app.png
+install -Dp %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/appdata/app.appdata.xml
+install -Dp %{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/gnome-shell/search-providers/search-provider.ini
+install -Dp %{SOURCE5} $RPM_BUILD_ROOT/%{_datadir}/help/C/app/index.page
+install -Dp %{SOURCE6} $RPM_BUILD_ROOT/%{_datadir}/applications/app-demo.desktop
+install -Dp %{SOURCE7} $RPM_BUILD_ROOT/%{_datadir}/dbus-1/services/app.service
+install -Dp %{SOURCE8} $RPM_BUILD_ROOT/%{_datadir}/appdata/app.metainfo.xml
+install -Dp %{SOURCE9} $RPM_BUILD_ROOT/%{_datadir}/appdata/app-extra.metainfo.xml
+install -Dp %{SOURCE10} $RPM_BUILD_ROOT/%{_datadir}/gir-1.0/app.gir
+install -Dp %{SOURCE11} $RPM_BUILD_ROOT/%{_datadir}/locale/en_GB/LC_MESSAGES/app.mo
+install -Dp %{SOURCE12} $RPM_BUILD_ROOT/%{_datadir}/locale/ru/LC_MESSAGES/app.mo
+install -Dp %{SOURCE13} $RPM_BUILD_ROOT/%{_datadir}/kde4/apps/app/app.notifyrc
+install -Dp %{SOURCE14} $RPM_BUILD_ROOT/%{_bindir}/app.bin
+
+%files
+%defattr(-,root,root)
+%doc %{_datadir}/%{name}-%{version}/README
+%{_bindir}/app.bin
+%{_datadir}/appdata/app.*.xml
+%{_datadir}/applications/*.desktop
+%{_datadir}/dbus-1/services/app.service
+%{_datadir}/gir-1.0/app.gir
+%{_datadir}/gnome-shell/search-providers/search-provider.ini
+%{_datadir}/help/*/app
+%{_datadir}/kde4/apps/app/app.notifyrc
+%{_datadir}/locale/en_GB/LC_MESSAGES/app.mo
+%{_datadir}/locale/ru/LC_MESSAGES/app.mo
+%{_datadir}/pixmaps/app.png
+
+%files extra
+%{_datadir}/appdata/app-extra.metainfo.xml
+
+%changelog
+* Tue Aug 12 2014 Richard Hughes <richard@hughsie.com> - 1-1
+- Initial version
diff --git a/data/tests/rpmbuild/README b/data/tests/rpmbuild/README
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/data/tests/rpmbuild/README
@@ -0,0 +1 @@
+
diff --git a/data/tests/rpmbuild/app-demo.desktop b/data/tests/rpmbuild/app-demo.desktop
new file mode 100644
index 0000000..9259484
--- /dev/null
+++ b/data/tests/rpmbuild/app-demo.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=App Demo
+Comment=A test demo application
+Icon=app
+Exec=app --demo
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;System;Profiling;
diff --git a/data/tests/rpmbuild/app-extra.metainfo.xml b/data/tests/rpmbuild/app-extra.metainfo.xml
new file mode 100644
index 0000000..c3d9c72
--- /dev/null
+++ b/data/tests/rpmbuild/app-extra.metainfo.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+ <id>app-extra</id>
+ <extends>app.desktop</extends>
+ <name>Extra</name>
+ <summary>Addons for extra functionality</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <updatecontact>richard_at_hughsie.com</updatecontact>
+</component>
diff --git a/data/tests/rpmbuild/app.appdata.xml b/data/tests/rpmbuild/app.appdata.xml
new file mode 100644
index 0000000..f804735
--- /dev/null
+++ b/data/tests/rpmbuild/app.appdata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+ <id type="desktop">app.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>LGPL-2.0+</project_license>
+ <description>
+ <p>Long description goes here.</p>
+ </description>
+ <screenshots>
+ <screenshot type="default">http://people.freedesktop.org/~hughsient/appdata/long-description.png</screenshot>
+ </screenshots>
+ <url type="homepage">http://people.freedesktop.org/~hughsient/appdata/</url>
+ <updatecontact>richard_at_hughsie.com</updatecontact>
+</application>
diff --git a/data/tests/rpmbuild/app.c b/data/tests/rpmbuild/app.c
new file mode 100644
index 0000000..67b80d6
--- /dev/null
+++ b/data/tests/rpmbuild/app.c
@@ -0,0 +1,16 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ * Copyright (C) 2014 Richard Hughes <richard@hughsie.com>
+ * Licensed under the GNU Lesser General Public License Version 2.1 */
+
+#include <gtk/gtk.h>
+
+int
+main (int argc, char *argv[])
+{
+ GtkApplication *app;
+ gtk_init (&argc, &argv);
+ app = gtk_application_new ("org.freedesktop.AppStream", G_APPLICATION_FLAGS_NONE);
+ gtk_application_get_menu_by_id (app, "not-going-to-exist");
+ g_object_unref (app);
+ return 0;
+}
diff --git a/data/tests/rpmbuild/app.desktop b/data/tests/rpmbuild/app.desktop
new file mode 100644
index 0000000..73b275e
--- /dev/null
+++ b/data/tests/rpmbuild/app.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=App
+Comment=A test application
+Icon=app
+Exec=app
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;System;Profiling;
+Keywords=Remote;Administration;
diff --git a/data/tests/rpmbuild/app.gir b/data/tests/rpmbuild/app.gir
new file mode 100644
index 0000000..02c372f
--- /dev/null
+++ b/data/tests/rpmbuild/app.gir
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+<include name="GLib" version="2.0"/>
+<include name="Gio" version="2.0"/>
+<include name="GObject" version="2.0"/>
+<include name="Gtk" version="3.0"/>
+</repository>
diff --git a/data/tests/rpmbuild/app.metainfo.xml b/data/tests/rpmbuild/app.metainfo.xml
new file mode 100644
index 0000000..45f9cb5
--- /dev/null
+++ b/data/tests/rpmbuild/app.metainfo.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+ <id>app-core</id>
+ <extends>app.desktop</extends>
+ <name>Core</name>
+ <summary>Addons for core functionality</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <updatecontact>richard_at_hughsie.com</updatecontact>
+</component>
diff --git a/data/tests/rpmbuild/app.notifyrc b/data/tests/rpmbuild/app.notifyrc
new file mode 100644
index 0000000..88d2c75
--- /dev/null
+++ b/data/tests/rpmbuild/app.notifyrc
@@ -0,0 +1,3 @@
+[Global]
+IconName=app
+Comment=App
diff --git a/data/tests/rpmbuild/app.png b/data/tests/rpmbuild/app.png
new file mode 100644
index 0000000..6234389
--- /dev/null
+++ b/data/tests/rpmbuild/app.png
Binary files differ
diff --git a/data/tests/rpmbuild/app.service b/data/tests/rpmbuild/app.service
new file mode 100644
index 0000000..9e1ae60
--- /dev/null
+++ b/data/tests/rpmbuild/app.service
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.freedesktop.AppStream
+Exec=app
diff --git a/data/tests/rpmbuild/build.sh b/data/tests/rpmbuild/build.sh
new file mode 100755
index 0000000..1949ada
--- /dev/null
+++ b/data/tests/rpmbuild/build.sh
@@ -0,0 +1,4 @@
+msgfmt ru.po -o ru.mo
+msgfmt en_GB.po -o en_GB.mo
+gcc -o app.bin app.c `pkg-config --cflags --libs gtk+-3.0`
+cp * ~/rpmbuild/SOURCES/ && rpmbuild -ba ../app.spec && cp ~/rpmbuild/RPMS/app*.rpm ../
diff --git a/data/tests/rpmbuild/en_GB.po b/data/tests/rpmbuild/en_GB.po
new file mode 100644
index 0000000..67eb9f0
--- /dev/null
+++ b/data/tests/rpmbuild/en_GB.po
@@ -0,0 +1,25 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Richard Hughes <richard@hughsie.com>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-power-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-05 10:10+0100\n"
+"PO-Revision-Date: 2011-03-09 19:20+0100\n"
+"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
+"Language-Team: British English <en@li.org>\n"
+"Language: en_GB\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgid "Show extra debugging information"
+msgstr "Show extra debugging informations"
+
+msgid "XXXShow extra debugging information"
+msgstr "XXXShow extra debugging informations"
diff --git a/data/tests/rpmbuild/index.page b/data/tests/rpmbuild/index.page
new file mode 100644
index 0000000..79891d3
--- /dev/null
+++ b/data/tests/rpmbuild/index.page
@@ -0,0 +1,6 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:e="http://projectmallard.org/experimental/"
+ type="guide" style="2column task"
+ id="index">
+</page>
diff --git a/data/tests/rpmbuild/ru.po b/data/tests/rpmbuild/ru.po
new file mode 100644
index 0000000..757b27e
--- /dev/null
+++ b/data/tests/rpmbuild/ru.po
@@ -0,0 +1,9 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Igor Gnatenko <i.gnatenko.brain@gmail.com>, 2014
+
+msgid "Show extra debugging information"
+msgstr "Показывать дополнительную отладочную информацию"
diff --git a/data/tests/rpmbuild/search-provider.ini b/data/tests/rpmbuild/search-provider.ini
new file mode 100644
index 0000000..b3161f6
--- /dev/null
+++ b/data/tests/rpmbuild/search-provider.ini
@@ -0,0 +1,3 @@
+[Shell Search Provider]
+DesktopId=app.desktop
+Version=2
diff --git a/data/tests/test-0.1-1.fc21.noarch.rpm b/data/tests/test-0.1-1.fc21.noarch.rpm
new file mode 100644
index 0000000..4fb974d
--- /dev/null
+++ b/data/tests/test-0.1-1.fc21.noarch.rpm
Binary files differ
diff --git a/data/tests/test.spec b/data/tests/test.spec
new file mode 100644
index 0000000..298ce87
--- /dev/null
+++ b/data/tests/test.spec
@@ -0,0 +1,25 @@
+Summary: Test package
+Name: test
+Version: 0.1
+Release: 1%{?dist}
+URL: http://people.freedesktop.org/~hughsient/
+Source0: README
+License: GPLv2+
+BuildArch: noarch
+Requires: foo
+Requires: bar
+Requires: baz
+
+%description
+This is a test package.
+
+%install
+install -Dp %{SOURCE0} $RPM_BUILD_ROOT/%{_datadir}/%{name}-%{version}/README
+
+%files
+%defattr(-,root,root)
+%doc %{_datadir}/%{name}-%{version}/README
+
+%changelog
+* Mon May 17 2010 Richard Hughes <richard@hughsie.com> - 0.1-1
+- Initial version