From 5caedfc3ca929d8033a4762ecbed92308111b910 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Tue, 27 Jun 2017 15:18:45 +0200 Subject: [PATCH] Change debian files packaging * rename package app-framework-binder to agl-app-framework-binder. * move packaging to conf.d/packaging as other packages Change-Id: Ia207345836fe3c44aef4d237c5785c537a725a81 Signed-off-by: Ronan Le Martret --- README.md | 2 +- .../packaging/agl-app-framework-binder.dsc | 11 +++++---- .../packaging/agl-app-framework-binder.spec | 27 ++++++++++++++++++++-- .../debian.agl-app-framework-binder-bin.install | 14 +++++++++++ .../debian.agl-app-framework-binder-dev.install | 3 +++ {packaging => conf.d/packaging}/debian.changelog | 2 +- {packaging => conf.d/packaging}/debian.compat | 0 {packaging => conf.d/packaging}/debian.control | 15 ++++++------ {packaging => conf.d/packaging}/debian.rules | 19 ++++++++++----- packaging/debian.app-framework-binder-bin.install | 13 ----------- packaging/debian.app-framework-binder-dev.install | 20 ---------------- 11 files changed, 71 insertions(+), 55 deletions(-) rename packaging/app-framework-binder.dsc => conf.d/packaging/agl-app-framework-binder.dsc (58%) rename packaging/app-framework-binder.spec => conf.d/packaging/agl-app-framework-binder.spec (66%) create mode 100644 conf.d/packaging/debian.agl-app-framework-binder-bin.install create mode 100644 conf.d/packaging/debian.agl-app-framework-binder-dev.install rename {packaging => conf.d/packaging}/debian.changelog (63%) rename {packaging => conf.d/packaging}/debian.compat (100%) rename {packaging => conf.d/packaging}/debian.control (55%) rename {packaging => conf.d/packaging}/debian.rules (54%) delete mode 100644 packaging/debian.app-framework-binder-bin.install delete mode 100644 packaging/debian.app-framework-binder-dev.install diff --git a/README.md b/README.md index af499a15..27d0110f 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ $ sudo make install
VERSION=2.0 GIT_TAG=master PKG_NAME=app-framework-binder -git archive --format=tar.gz --prefix=${PKG_NAME}-${VERSION}/ ${GIT_TAG} -o ${PKG_NAME}_${VERSION}.orig.tar.gz +git archive --format=tar.gz --prefix=agl-${PKG_NAME}-${VERSION}/ ${GIT_TAG} -o agl-${PKG_NAME}_${VERSION}.orig.tar.gz ``` ### Testing/Debug diff --git a/packaging/app-framework-binder.dsc b/conf.d/packaging/agl-app-framework-binder.dsc similarity index 58% rename from packaging/app-framework-binder.dsc rename to conf.d/packaging/agl-app-framework-binder.dsc index f0a97ebc..96612fbe 100644 --- a/packaging/app-framework-binder.dsc +++ b/conf.d/packaging/agl-app-framework-binder.dsc @@ -1,18 +1,19 @@ Format: 1.0 -Source: app-framework-binder -Binary: app-framework-binder-bin, app-framework-binder-dev +Source: agl-app-framework-binder +Binary: agl-app-framework-binder-bin, agl-app-framework-binder-dev Architecture: any Version: 2.0-0 Maintainer: unknown Standards-Version: 3.8.2 Homepage: https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder Build-Depends: debhelper (>= 5), - libmicrohttpd-dev , + dpkg-dev, + libmicrohttpd-dev (>= 0.9.54), cmake, - libsystemd-dev, + libsystemd-dev (>= 222), libssl-dev, uuid-dev, libgcrypt20-dev, libjson-c-dev, libmagic-dev -Debtransform-Tar: app-framework-binder_2.0.orig.tar.gz +Debtransform-Tar: agl-app-framework-binder_2.0.orig.tar.gz diff --git a/packaging/app-framework-binder.spec b/conf.d/packaging/agl-app-framework-binder.spec similarity index 66% rename from packaging/app-framework-binder.spec rename to conf.d/packaging/agl-app-framework-binder.spec index 3bdb7682..cc920a0c 100644 --- a/packaging/app-framework-binder.spec +++ b/conf.d/packaging/agl-app-framework-binder.spec @@ -2,7 +2,10 @@ # spec file for package app-framework-binder # -Name: app-framework-binder +%define _prefix /opt/AGL +%define __cmake cmake + +Name: agl-app-framework-binder Version: 2.0 Release: 0 License: GPL-2.0 @@ -14,7 +17,7 @@ Source: %{name}_%{version}.orig.tar.gz BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.54 BuildRequires: make BuildRequires: cmake -BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libsystemd) >= 222 BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(uuid) BuildRequires: libgcrypt-devel @@ -31,6 +34,7 @@ app-framework-binder Summary: app-framework-binder-devel Group: Development/Libraries/C and C++ Requires: %{name} = %{version} +Provides: pkgconfig(%{name}) = %{version} %description devel app-framework-binder-devel @@ -39,6 +43,7 @@ app-framework-binder-devel %setup -q %build +export PKG_CONFIG_PATH=%{_libdir}/pkgconfig %cmake %__make %{?_smp_mflags} @@ -47,18 +52,31 @@ app-framework-binder-devel [ -d build ] && cd build %make_install +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/AGL_%{name}.sh +#---------- AGL %{name} options Start ---------" +# Object: AGL cmake option for binder/bindings +export LD_LIBRARY_PATH=%{_libdir}:\${LD_LIBRARY_PATH} +export LIBRARY_PATH=%{_libdir}:\${LIBRARY_PATH} +export PKG_CONFIG_PATH=%{_libdir}/pkgconfig:\${PKG_CONFIG_PATH} +export PATH=%{_bindir}:\$PATH +#---------- AGL options End --------- +EOF + %post %postun %files %defattr(-,root,root) +%dir %{_bindir} %{_bindir}/afb-client-demo %{_bindir}/afb-daemon %{_bindir}/afb-genskel %{_bindir}/afb-exprefs %{_bindir}/afb-json2c +%dir %{_libdir} %dir %{_libdir}/afb %{_libdir}/afb/afb-dbus-binding.so %{_libdir}/afb/authLogin.so @@ -71,9 +89,14 @@ app-framework-binder-devel %{_libdir}/afb/helloWorld.so %{_libdir}/afb/tic-tac-toe.so +%{_sysconfdir}/profile.d/AGL_%{name}.sh + %files devel %defattr(-,root,root) +%dir %{_prefix} %{_libdir}/libafbwsc.so +%dir %{_includedir} %dir %{_includedir}/afb %{_includedir}/afb/*.h +%dir %{_libdir}/pkgconfig %{_libdir}/pkgconfig/*.pc diff --git a/conf.d/packaging/debian.agl-app-framework-binder-bin.install b/conf.d/packaging/debian.agl-app-framework-binder-bin.install new file mode 100644 index 00000000..3faebfb3 --- /dev/null +++ b/conf.d/packaging/debian.agl-app-framework-binder-bin.install @@ -0,0 +1,14 @@ +/opt/AGL/lib/*/libafbwsc.so.1.0 +/opt/AGL/lib/*/libafbwsc.so.1 +/opt/AGL/lib/*/afb/authLogin.so +/opt/AGL/lib/*/afb/demoPost.so +/opt/AGL/lib/*/afb/afb-dbus-binding.so +/opt/AGL/lib/*/afb/tic-tac-toe.so +/opt/AGL/lib/*/afb/helloWorld.so +/opt/AGL/lib/*/afb/demoContext.so +/opt/AGL/bin/afb-json2c +/opt/AGL/bin/afb-daemon +/opt/AGL/bin/afb-exprefs +/opt/AGL/bin/afb-client-demo +/opt/AGL/bin/afb-genskel +/etc/profile.d/AGL_app-framework-binder.sh diff --git a/conf.d/packaging/debian.agl-app-framework-binder-dev.install b/conf.d/packaging/debian.agl-app-framework-binder-dev.install new file mode 100644 index 00000000..2d1a4016 --- /dev/null +++ b/conf.d/packaging/debian.agl-app-framework-binder-dev.install @@ -0,0 +1,3 @@ +/opt/AGL/include/afb/*.h +/opt/AGL/lib/*/pkgconfig/*.pc +/opt/AGL/lib/*/libafbwsc.so diff --git a/packaging/debian.changelog b/conf.d/packaging/debian.changelog similarity index 63% rename from packaging/debian.changelog rename to conf.d/packaging/debian.changelog index c1b0e043..131bac4b 100644 --- a/packaging/debian.changelog +++ b/conf.d/packaging/debian.changelog @@ -1,4 +1,4 @@ -app-framework-binder (2.0-0) unstable; urgency=low +agl-app-framework-binder (2.0-0) unstable; urgency=low * init build diff --git a/packaging/debian.compat b/conf.d/packaging/debian.compat similarity index 100% rename from packaging/debian.compat rename to conf.d/packaging/debian.compat diff --git a/packaging/debian.control b/conf.d/packaging/debian.control similarity index 55% rename from packaging/debian.control rename to conf.d/packaging/debian.control index e75a5be1..948f3fe1 100644 --- a/packaging/debian.control +++ b/conf.d/packaging/debian.control @@ -1,10 +1,10 @@ Priority: optional Maintainer: unknown -Source: app-framework-binder +Source: agl-app-framework-binder Build-Depends: debhelper (>= 5), - libmicrohttpd-dev , + libmicrohttpd-dev (>= 0.9.54), cmake, - libsystemd-dev, + libsystemd-dev (>= 222), libssl-dev, uuid-dev, libgcrypt20-dev, @@ -13,13 +13,14 @@ Build-Depends: debhelper (>= 5), Standards-Version: 3.8.2 Homepage: https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder -Package: app-framework-binder-bin +Package: agl-app-framework-binder-bin Section: libs Architecture: any -Description: app-framework-binder +Description: agl-app-framework-binder -Package: app-framework-binder-dev +Package: agl-app-framework-binder-dev Section: libs Architecture: any -Description: app-framework-binder-devel +Depends: agl-app-framework-binder-bin +Description: agl-app-framework-binder-devel diff --git a/packaging/debian.rules b/conf.d/packaging/debian.rules similarity index 54% rename from packaging/debian.rules rename to conf.d/packaging/debian.rules index 560cf415..4fcc791c 100644 --- a/packaging/debian.rules +++ b/conf.d/packaging/debian.rules @@ -30,8 +30,7 @@ build: build-stamp build-stamp: configure-stamp dh_testdir mkdir -p build - cd build;cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr;$(MAKE) - # + export PKG_CONFIG_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH)/pkgconfig;cd build;cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/opt/AGL -DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH);$(MAKE) touch build-stamp clean: @@ -47,7 +46,15 @@ install: build dh_prep dh_installdirs # Add here commands to install the package into debian/tmp - [ -d build ] && cd build;make install DESTDIR=/usr/src/packages/BUILD/debian/tmp + cd build;make install DESTDIR=/usr/src/packages/BUILD/debian/tmp + mkdir -p debian/tmp/etc/profile.d + echo '#---------- AGL app-framework-binder options Start ---------" ' > debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo '# Object: AGL cmake option for binder/bindings' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo 'export LD_LIBRARY_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH):$${LD_LIBRARY_PATH}' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo 'export LIBRARY_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH):$${LIBRARY_PATH}' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo 'export PKG_CONFIG_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:$${PKG_CONFIG_PATH}' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo 'export PATH=/opt/AGL/bin:$${PATH}' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh + echo '#---------- AGL options End ---------' >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh # Move all files in their corresponding package dh_install --list-missing -s --sourcedir=debian/tmp # empty dependency_libs in .la files @@ -66,12 +73,12 @@ binary-arch: build install dh_installexamples dh_installman dh_link - #dh_strip + dh_strip dh_compress dh_fixperms dh_makeshlibs -V - #dh_installdeb - dh_shlibdeps + dh_installdeb + #dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb diff --git a/packaging/debian.app-framework-binder-bin.install b/packaging/debian.app-framework-binder-bin.install deleted file mode 100644 index dc404956..00000000 --- a/packaging/debian.app-framework-binder-bin.install +++ /dev/null @@ -1,13 +0,0 @@ -/usr/lib/*/libafbwsc.so.1.0 -/usr/lib/*/libafbwsc.so.1 -/usr/lib/*/afb/authLogin.so -/usr/lib/*/afb/demoPost.so -/usr/lib/*/afb/afb-dbus-binding.so -/usr/lib/*/afb/tic-tac-toe.so -/usr/lib/*/afb/helloWorld.so -/usr/lib/*/afb/demoContext.so -/usr/bin/afb-json2c -/usr/bin/afb-daemon -/usr/bin/afb-exprefs -/usr/bin/afb-client-demo -/usr/bin/afb-genskel diff --git a/packaging/debian.app-framework-binder-dev.install b/packaging/debian.app-framework-binder-dev.install deleted file mode 100644 index 28bedfd6..00000000 --- a/packaging/debian.app-framework-binder-dev.install +++ /dev/null @@ -1,20 +0,0 @@ -/usr/include/afb/afb-daemon-v1.h -/usr/include/afb/afb-req-itf.h -/usr/include/afb/afb-session-v1.h -/usr/include/afb/afb-event-itf.h -/usr/include/afb/afb-auth.h -/usr/include/afb/afb-ws-client.h -/usr/include/afb/afb-session-v2.h -/usr/include/afb/afb-daemon-v2.h -/usr/include/afb/afb-service-itf.h -/usr/include/afb/afb-binding-v2.h -/usr/include/afb/afb-service-common.h -/usr/include/afb/afb-binding.h -/usr/include/afb/afb-binding-v1.h -/usr/include/afb/afb-wsj1.h -/usr/include/afb/afb-service-v2.h -/usr/include/afb/afb-service-v1.h -/usr/include/afb/afb-daemon-common.h -/usr/lib/*/pkgconfig/libafbwsc.pc -/usr/lib/*/pkgconfig/afb-daemon.pc -/usr/lib/*/libafbwsc.so -- 2.16.6