From 2556af692e3e975e3aca10cd95ac0a08fac8cdcb Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 8 Oct 2018 23:56:05 +0200 Subject: [PATCH] Add OBS packaging recipes for retroshare-service --- .../retroshare-service-git/appimage.yml | 30 +++++ .../ArchLinuxAndDerivatives_OBS/PKGBUILD | 45 +++++++ .../retroshare-service-git/debian.changelog | 5 + .../retroshare-service-git/debian.compat | 1 + .../retroshare-service-git/debian.control | 19 +++ .../debian.retroshare-service-git.install | 2 + .../retroshare-service-git/debian.rules | 59 +++++++++ .../retroshare-service-git/debian.series | 0 .../retroshare-service-git.dsc | 11 ++ .../RpmBased_OBS/retroshare-service-git.spec | 120 ++++++++++++++++++ 10 files changed, 292 insertions(+) create mode 100644 build_scripts/AppImage_OBS/retroshare-service-git/appimage.yml create mode 100644 build_scripts/ArchLinuxAndDerivatives_OBS/PKGBUILD create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.changelog create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.compat create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.control create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.retroshare-service-git.install create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.rules create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.series create mode 100644 build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/retroshare-service-git.dsc create mode 100644 build_scripts/RpmBased_OBS/retroshare-service-git.spec diff --git a/build_scripts/AppImage_OBS/retroshare-service-git/appimage.yml b/build_scripts/AppImage_OBS/retroshare-service-git/appimage.yml new file mode 100644 index 000000000..d49dc9eea --- /dev/null +++ b/build_scripts/AppImage_OBS/retroshare-service-git/appimage.yml @@ -0,0 +1,30 @@ +app: retroshare-service + +build: + packages: + - gcc7 + - gcc7-c++ + - libxapian-devel + - doxygen + - linuxdeployqt + - desktop-file-utils + - glib2-devel + - sqlcipher-devel + - libqt5-qtbase-devel + - libqt5-qttools-devel + - openssl-devel + - update-desktop-files + - libbz2-devel + - libupnp-devel + +script: + - cd $BUILD_SOURCE_DIR + - tar -xf RetroShare-git.tar.gz + - cd RetroShare-git + - ls $(which gcc)* + - ls $(which g++)* + - qmake-qt5 QMAKE_CC=gcc-7 QMAKE_CXX=g++-7 PREFIX=/usr CONFIG-=debug CONFIG+=release CONFIG+=no_retroshare_nogui CONFIG+=no_retroshare_plugins CONFIG+=no_retroshare_qml_app CONFIG+=no_retroshare_android_notify_service CONFIG+=no_retroshare_plugins CONFIG+=ipv6 CONFIG+=no_retroshare_nogui CONFIG+=no_tests CONFIG+=rs_jsonapi CONFIG+=no_retroshare_android_service CONFIG+=rs_deep_search CONFIG+=no_libresapilocalserver CONFIG+=no_retroshare_gui CONFIG+=no_libresapihttpserver CONFIG+=retroshare_service CONFIG+=no_libresapi CONFIG+=c++11 CONFIG+=appimage + - make -j$(nproc) || make -j$(nproc) || make + - make INSTALL_ROOT=$BUILD_APPDIR install + - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH + - linuxdeployqt $BUILD_APPDIR/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=3 -no-strip \ No newline at end of file diff --git a/build_scripts/ArchLinuxAndDerivatives_OBS/PKGBUILD b/build_scripts/ArchLinuxAndDerivatives_OBS/PKGBUILD new file mode 100644 index 000000000..70c970ded --- /dev/null +++ b/build_scripts/ArchLinuxAndDerivatives_OBS/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Gioacchino Mazzurco +# Contributor: AsamK +# Contributor: sehraf +# Contributor: stqn +# Contributor: JHeaton +# Contributor: Tristero +# Contributor: funkyou + +pkgname=retroshare-service-git +pkgver=git +pkgrel=0 +pkgdesc="Serverless encrypted instant messenger with filesharing, chatgroups, e-mail. System service version." +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +url="https://retroshare.net/" +license=('AGPL' 'GPL' 'LGPL') +depends=('bzip2' 'libupnp' 'libzip' 'openssl' 'rapidjson' 'sqlcipher' 'xapian-core') +makedepends=('cmake' 'doxygen' 'git' 'pkgconf' 'qt5-tools') +provides=('retroshare-service') +conflicts=('retroshare-service') + +source=(RetroShare-${pkgver}.tar.gz) + +md5sums=('3c66108223b427d617b962aff0755378') + +prepare() { + cd "${srcdir}/RetroShare-${pkgver}" +} + +build() { + cd "${srcdir}/RetroShare-${pkgver}" + qmake-qt5 PREFIX=/usr DATA_DIR=/usr/share/retroshare CONFIG-=debug \ + CONFIG+=ipv6 CONFIG+=no_retroshare_android_service \ + CONFIG+=no_retroshare_android_notify_service \ + CONFIG+=no_retroshare_plugins CONFIG+=no_retroshare_nogui \ + CONFIG+=no_retroshare_gui CONFIG+=no_tests CONFIG+=no_libresapi \ + CONFIG+=no_libresapihttpserver CONFIG+=no_libresapilocalserver \ + CONFIG+=retroshare_service CONFIG+=rs_jsonapi CONFIG+=rs_deep_search \ + CONFIG+=release + make -j$(nproc) || make -j$(nproc) || make +} + +package() { + cd "${srcdir}/RetroShare-${pkgver}" + make INSTALL_ROOT="${pkgdir}" install +} diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.changelog b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.changelog new file mode 100644 index 000000000..92f41bd59 --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.changelog @@ -0,0 +1,5 @@ +retroshare-service-git (0.6.9999) stable; urgency=low + + Add retroshare-service-git package + + -- Gioacchino Mazzurco Tue, 08 Oct 2018 15:40:00 +0100 diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.compat b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.compat new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.compat @@ -0,0 +1 @@ +7 diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.control b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.control new file mode 100644 index 000000000..6e9013142 --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.control @@ -0,0 +1,19 @@ +Source: retroshare-service-git +Section: devel +Priority: standard +Maintainer: Cyril Soler +Build-Depends: cmake, debhelper (>= 7), git, libglib2.0-dev, libupnp-dev, qtbase5-dev, qt5-default, libssl-dev, libbz2-dev, libsqlcipher-dev, libxapian-dev +Standards-Version: 3.9.3 +Homepage: http://retroshare.net + +Package: retroshare-service-git +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Secure communication with friends + RetroShare is a Free and Open Source, private and secure decentralized + communication platform. It lets you to securely chat and share files with your + friends and family, using a web-of-trust to authenticate peers and OpenSSL to + encrypt all communication. RetroShare provides filesharing, chat, messages, + forums and channels. + This package provide a headless RetroShare node that can be controlled only + using the JSON API. diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.retroshare-service-git.install b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.retroshare-service-git.install new file mode 100644 index 000000000..d1e2a398e --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.retroshare-service-git.install @@ -0,0 +1,2 @@ +debian/tmp/usr/bin/retroshare-service +debian/tmp/usr/share/retroshare/bdboot.txt diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.rules b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.rules new file mode 100644 index 000000000..204288931 --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.rules @@ -0,0 +1,59 @@ +#!/usr/bin/make -f + +configure: configure-stamp +configure-stamp: + dh_testdir + qmake --version + qmake CONFIG-=debug CONFIG+=release PREFIX=/usr LIB_DIR=/usr/lib \ + CONFIG+=no_retroshare_plugins CONFIG+=no_retroshare_nogui \ + CONFIG+=no_retroshare_gui CONFIG+=no_tests CONFIG+=no_libresapi \ + CONFIG+=no_libresapihttpserver CONFIG+=no_libresapilocalserver \ + CONFIG+=retroshare_service CONFIG+=rs_jsonapi CONFIG+=rs_deep_search \ + CONFIG+=c++11 RetroShare.pro + touch $@ + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) -j$(shell nproc) || $(MAKE) -j$(shell nproc) || $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + #dh_installdirs + $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/tmp install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_install --list-missing + #dh_installdocs + #dh_installexamples + #dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.series b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/debian.series new file mode 100644 index 000000000..e69de29bb diff --git a/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/retroshare-service-git.dsc b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/retroshare-service-git.dsc new file mode 100644 index 000000000..93a7f193e --- /dev/null +++ b/build_scripts/DebianAndDerivatives_OBS/retroshare-service-git/retroshare-service-git.dsc @@ -0,0 +1,11 @@ +Format: 1.0 +Source: retroshare-service-git +Binary: retroshare-service-git +Architecture: any +Version: 0.6.9999 +Maintainer: Cyril Soler +Homepage: https://retroshare.net +Standards-Version: 3.8.1 +Build-Depends: cmake, debhelper (>= 7), git, libglib2.0-dev, libupnp-dev, qtbase5-dev, qt5-default, libssl-dev, libbz2-dev, libsqlcipher-dev, libxapian-dev +Files: + f562e399ef7d44ebc01362f365b4f30b 23617604 RetroShare-git.tar.gz diff --git a/build_scripts/RpmBased_OBS/retroshare-service-git.spec b/build_scripts/RpmBased_OBS/retroshare-service-git.spec new file mode 100644 index 000000000..8718bf524 --- /dev/null +++ b/build_scripts/RpmBased_OBS/retroshare-service-git.spec @@ -0,0 +1,120 @@ +Name: retroshare-service-git +Version: 0.6.4 +Release: 0 +License: GNU AFFERO GENERAL PUBLIC LICENSE version 3 +Summary: Secure chat and file sharing +Group: Productivity/Networking/Other +Url: http://retroshare.net +#Source0: https://github.com/RetroShare/RetroShare/archive/v%{version}.tar.gz#/RetroShare-%{version}.tar.gz +Source0: RetroShare-git.tar.gz +#Patch0: various.patch +BuildRoot: %{_tmppath}/%{name} +Conflicts: retroshare-service +Requires: libupnp openssl sqlcipher +BuildRequires: cmake git libupnp-devel openssl-devel sqlcipher-devel + +%if %{defined centos_version} +BuildRequires: qt5-qtbase-devel qt5-qttools-devel qt5-qttools-static +Requires: qt5-qtbase +%endif + +%if 0%{?fedora_version} +BuildRequires: gcc-c++ +BuildRequires: fdupes xapian-core-devel +BuildRequires: qt5-qtbase-devel qt5-qttools-devel qt5-qttools-static +Requires: qt5-qtbase xapian-core +%endif + +%if %{defined mageia} +BuildRequires: gcc-c++ +BuildRequires: libzlib-devel libbzip2-devel +BuildRequires: libqt5core-devel libqt5xml-devel libxapian-devel +Requires: libqt5core libqt5xml5 libxapian +%endif + +%if 0%{?suse_version} +BuildRequires: gcc7 gcc7-c++ +BuildRequires: fdupes libbz2-devel +BuildRequires: libqt5-qtbase-devel libqt5-qttools-devel +BuildRequires: libxapian-devel update-desktop-files +Requires: libbz2 libxapian +%endif + +%if 0%{?fedora_version} >= 27 +%undefine _debugsource_packages +%undefine _debuginfo_subpackages +%endif + +%description +RetroShare is a cross-platform F2F communication platform. +It lets you share securely with your friends, using PGP +to authenticate peers and OpenSSL to encrypt all communication. +RetroShare provides filesharing, chat, messages and channels. +This package provides RetroShare system service that can be +controlled only via JSON API. + +Authors: +see http://retroshare.net/ +-------- + +%prep +%setup -n RetroShare-git +#%patch0 -p0 + +%build + +nproc +qmake --version || qmake-qt5 --version +ls $(which gcc)* +ls $(which g++)* + +BUILD_CC="" +BUILD_CXX="" +BUILD_DEEPSEARCH="CONFIG+=rs_deep_search" +QMAKE="qmake-qt5" + +%if %{defined centos_version} +# Xapian is not availabe on Centos 7 +BUILD_DEEPSEARCH="CONFIG+=no_rs_deep_search" +%endif + +%if %{defined mageia} +QMAKE="qmake" +%endif + +%if 0%{?suse_version} +BUILD_CC="QMAKE_CC=gcc-7" +BUILD_CXX="QMAKE_CXX=g++-7" +%endif + +$QMAKE $BUILD_CC $BUILD_CXX QMAKE_STRIP=echo PREFIX="%{_prefix}" \ + BIN_DIR="%{_bindir}" \ + LIB_DIR="%{_libdir}" DATA_DIR="%{_datadir}/retroshare" CONFIG-=debug \ + CONFIG+=ipv6 CONFIG+=no_retroshare_android_service \ + CONFIG+=no_retroshare_android_notify_service \ + CONFIG+=no_retroshare_plugins CONFIG+=no_retroshare_nogui \ + CONFIG+=no_retroshare_gui CONFIG+=no_tests CONFIG+=no_libresapi \ + CONFIG+=no_libresapihttpserver CONFIG+=no_libresapilocalserver \ + CONFIG+=retroshare_service CONFIG+=rs_jsonapi ${BUILD_DEEPSEARCH} \ + CONFIG+=release RetroShare.pro +make -j$(nproc) || make -j$(nproc) || make + +%install +rm -rf $RPM_BUILD_ROOT +make INSTALL_ROOT=$RPM_BUILD_ROOT install + +%if 0%{?centos_version} < 800 +%else +%fdupes %{buildroot}/%{_prefix} +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%{_bindir}/retroshare-service +%defattr(644, root, root) +%{_datadir}/retroshare + +%changelog