initial packaging of 0.6.1
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 19 Sep 2014 11:42:54 +0000 (13:42 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 19 Sep 2014 11:42:54 +0000 (13:42 +0200)
packaging/cloudeebus.spec [new file with mode: 0644]

diff --git a/packaging/cloudeebus.spec b/packaging/cloudeebus.spec
new file mode 100644 (file)
index 0000000..4df334e
--- /dev/null
@@ -0,0 +1,67 @@
+Name: cloudeebus
+Summary: JavaScript bindings for D-Bus services
+Version: 0.6.1
+Release: 1
+Group: Web Framework/Web Run Time
+License: Apache-2.0
+URL: https://01.org/cloudeebus
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: python
+Requires: pycrosswalk
+
+# We only install noarch files, but have to use an arch directory for
+# them because we need to link to an arch-specific .so file.
+# Specifying this leads to only one warning, while adding it leads to
+# one warning per file:
+# BuildArch: noarch
+
+%description
+The %{name} package contains a Crosswalk extension implemented
+in Python which dynamically creates JavaScript bindings for
+D-Bus services.
+
+%package examples
+Summary: Example .html and run scripts for %{name}
+Group: Web Framework/Web Run Time
+Requires: %{name}
+
+%description examples
+The %{name} package contains .html files demonstrating how to use Cloudeebus
+and shell scripts to run them under Crosswalk.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+# regenerate bundled .js
+make -C src/js clean all
+
+%install
+mkdir -p %{buildroot}%{_libdir}/tizen-extensions-crosswalk
+for i in cloudeebusengine.py cloudeebus.js xwalkcloudeebus.py; do
+    install -p -m 644 cloudeebus/$i %{buildroot}%{_libdir}/tizen-extensions-crosswalk/$i
+done
+# The Crosswalk extension .so must be named like the corresponding .py
+# file, to inform libpycrosswalk.so which Python file it needs to
+# load.
+ln -s %{_libdir}/pycrosswalk/libpycrosswalk.so %{buildroot}%{_libdir}/tizen-extensions-crosswalk/libxwalkcloudeebus.so
+
+mkdir -p %{buildroot}%{_datadir}/doc/cloudeebus/agent
+for i in client server; do
+    install -p -m 644 doc/agent/$i.html %{buildroot}%{_datadir}/doc/cloudeebus/agent/$i.html
+    cat >%{buildroot}%{_datadir}/doc/cloudeebus/agent/$i.sh <<EOF
+#! /bin/sh
+xwalk-launcher file://%{_datadir}/doc/cloudeebus/agent/$i.html
+EOF
+    chmod 755 %{buildroot}%{_datadir}/doc/cloudeebus/agent/$i.sh
+done
+
+%files
+%license LICENSE
+%{_libdir}/tizen-extensions-crosswalk/cloudeebusengine.py
+%{_libdir}/tizen-extensions-crosswalk/cloudeebus.js
+%{_libdir}/tizen-extensions-crosswalk/xwalkcloudeebus.py
+%{_libdir}/tizen-extensions-crosswalk/libxwalkcloudeebus.so
+
+%files examples
+%{_datadir}/doc/cloudeebus