aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/packaging/rpm/agl-app-afb-test.spec
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-10-25 11:38:38 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-26 10:43:36 +0200
commit91e90e59a593bea0ef1771a860140ae347692910 (patch)
treeae91484dd2f6b72d7bd27dd8dc48a0abf76bb215 /conf.d/packaging/rpm/agl-app-afb-test.spec
parentafa8decdbbc2959a413c1d9d7cd054df4ea4e4ff (diff)
Add packaging materials
Files used by an OBS server to be able to build deb and rpm packages. The afb-test binding could be then used in a native environment. Change-Id: Ifd5ab363c90269bed949ff63315d228017de7d05 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/packaging/rpm/agl-app-afb-test.spec')
-rw-r--r--conf.d/packaging/rpm/agl-app-afb-test.spec94
1 files changed, 94 insertions, 0 deletions
diff --git a/conf.d/packaging/rpm/agl-app-afb-test.spec b/conf.d/packaging/rpm/agl-app-afb-test.spec
new file mode 100644
index 0000000..bf02a07
--- /dev/null
+++ b/conf.d/packaging/rpm/agl-app-afb-test.spec
@@ -0,0 +1,94 @@
+#
+# spec file for package app-afb-test
+#
+
+%define _prefix /opt/AGL
+%define __cmake cmake
+
+%if 0%{?fedora_version}
+%global debug_package %{nil}
+%endif
+
+Name: agl-app-afb-test
+# WARNING {name} is not used for tar file name in source nor for setup
+# Check hard coded values required to match git directory naming
+Version: 2.0
+Release: 0
+License: Apache-2.0
+Summary: AGL app-afb-test
+Group: Development/Libraries/C and C++
+Url: https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/app-afb-test
+Source: app-afb-test-%{version}.tar.gz
+Patch0: project_version.patch
+BuildRequires: pkgconfig(lua) >= 5.3
+BuildRequires: cmake
+BuildRequires: gcc-c++
+BuildRequires: pkgconfig(json-c)
+BuildRequires: pkgconfig(afb-daemon)
+BuildRequires: pkgconfig(libsystemd) >= 222
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%description
+This is a migration of former app-templates git submodule which let you ease the
+development of apps and widget building.
+
+%package devel
+Group: Development/Libraries/C and C++
+Requires: %{name} = %{version}
+Provides: pkgconfig(%{name}) = %{version}
+Summary: AGL app-afb-test-devel
+%description devel
+This is a migration of former app-templates git submodule which let you ease the
+development of apps and widget building.
+
+%prep
+%setup -q -n app-afb-test-%{version}
+%patch0 -p1
+
+%build
+export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
+[ ! -d build ] && mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=DEBUG ..
+%__make %{?_smp_mflags}
+
+%install
+[ -d build ] && cd build
+%make_install
+mkdir -p %{buildroot}%{_prefix}/afm/applications/afTest/%{version}
+mv %{buildroot}%{_prefix}/afTest/* %{buildroot}/%{_prefix}/afm/applications/afTest/%{version}
+rmdir %{buildroot}/%{_prefix}/afTest
+
+%post
+
+%postun
+
+%files
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_bindir}
+%{_bindir}/afm-test
+%dir %{_prefix}/afm/
+%dir %{_prefix}/afm/applications/
+%dir %{_prefix}/afm/applications/afTest/
+%dir %{_prefix}/afm/applications/afTest/%{version}/
+%dir %{_prefix}/afm/applications/afTest/%{version}/etc
+%{_prefix}/afm/applications/afTest/%{version}/etc/aft-afbtest.json
+%dir %{_prefix}/afm/applications/afTest/%{version}/bin
+%dir %{_prefix}/afm/applications/afTest/%{version}/lib
+%{_prefix}/afm/applications/afTest/%{version}/lib/aft.so
+%dir %{_prefix}/afm/applications/afTest/%{version}/htdocs
+%dir %{_prefix}/afm/applications/afTest/%{version}/var
+%{_prefix}/afm/applications/afTest/%{version}/var/aft.lua
+%{_prefix}/afm/applications/afTest/%{version}/var/luaunit.lua
+
+%files devel
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*.pc
+
+%changelog
+* Thu Oct 25 2018 Romain
+- initial creation