diff --git a/.travis.yml b/.travis.yml index 5aa8df833b3a112b963c97ecd97a35921f5b17e1..5e61be49cddbb7ae96d7e586ea53285179abed00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ script: - mntdir='/mnt/ocs-url' - docker run --rm -v $(pwd):${mntdir} ubuntu:14.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh ubuntu" - docker run --rm -v $(pwd):${mntdir} fedora:20 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh fedora" + - docker run --rm -v $(pwd):${mntdir} opensuse:42.1 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh opensuse" - docker run --rm -v $(pwd):${mntdir} base/archlinux:latest /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh archlinux" #- docker run --rm -v $(pwd):${mntdir} ubuntu:16.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh snap" #- docker run --rm -v $(pwd):${mntdir} --cap-add SYS_ADMIN --device /dev/fuse ubuntu:14.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh appimage" diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 3879c13c683ad6f317eea63a9c8483a4f0718c0e..8899437ea630bfd7e6bb9aec9002cb2934f88684 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -19,6 +19,12 @@ pipelines: script: - sh scripts/build-docker.sh fedora - cat transfer.log + build-opensuse: + - step: + image: opensuse:42.1 + script: + - sh scripts/build-docker.sh opensuse + - cat transfer.log build-archlinux: - step: image: base/archlinux:latest diff --git a/pkg/opensuse/ocs-url.spec b/pkg/opensuse/ocs-url.spec new file mode 100644 index 0000000000000000000000000000000000000000..ea075d71fd0286c816fc55a87133a6fec274e404 --- /dev/null +++ b/pkg/opensuse/ocs-url.spec @@ -0,0 +1,77 @@ +Summary: OCS-URL +Name: ocs-url +Version: 3.0.0 +Release: 1%{?dist} +License: GPLv3+ +Group: Applications/Internet +URL: https://github.com/ocs-url/ocs-url + +#Source0: https://github.com/ocs-url/ocs-url/archive/release-%{version}.tar.gz +Source0: %{name}.tar.gz + +Requires: libqt5-qtbase >= 5.2.0, libQt5Gui5 >= 5.2.0, libqt5-qtsvg >= 5.2.0, libqt5-qtdeclarative >= 5.2.0, libqt5-qtquickcontrols >= 5.2.0 +BuildRequires: make, automake, gcc, gcc-c++, libtool, libqt5-qtbase-devel >= 5.2.0, libqt5-qtsvg-devel >= 5.2.0, libqt5-qtdeclarative-devel >= 5.2.0, git, rpm-build + +%description +An install helper program for items served on OpenCollaborationServices (OCS). + +%prep +#%%autosetup -n %{name}-release-%{version} +%autosetup -n %{name} +sh scripts/import.sh + +%build +%define debug_package %{nil} +qmake-qt5 PREFIX="/usr" +make + +%install +make INSTALL_ROOT="%{buildroot}" install + +%files +%defattr(-,root,root) +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg + +%clean +rm -rf %{buildroot} + +%changelog +* Sun Mar 05 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.0-1 +- Rename xdgurl to ocs-url +- Add ocs:// and ocss:// schemes +- xdg:// and xdgs:// schemes still available for backward compatibile +- New app icon +- New dialog window +- Labels and messages are translatable +- Qt 5.2 support +- Use the same configs of install-types with ocsstore +- Add en_US translation +- Add ja_JP translation +- Add tr_TR translation (by tarakbumba) + +* Wed Jan 25 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.3-1 +- Change installation destination of type bin +- Update qtlib +- Fix for dialog + +* Thu Nov 17 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.2-1 +- Update qtlibs +- Small fix + +* Mon Nov 14 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.1-1 +- Update library +- Fix download/installation process + +* Fri Oct 28 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.0-1 +- Re-implemented xdgurl as Qt program +- Download progress bar +- Add install-type "bin" + +* Fri Jul 15 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 1.0.1-1 +- Clean successfull message +- Return exit code + +* Wed Jul 06 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 1.0.0-1 +- Initial release diff --git a/pkg/pkg.pri b/pkg/pkg.pri index 2ecc518745aa61d4e37947c2d1e78cd6e5383329..8cf464f917cbede180ea0ed3b47e0c9cf3af2474 100644 --- a/pkg/pkg.pri +++ b/pkg/pkg.pri @@ -6,6 +6,7 @@ DISTFILES += \ $${PWD}/ubuntu/debian/rules \ $${PWD}/ubuntu/debian/ocs-url.install \ $${PWD}/fedora/ocs-url.spec \ + $${PWD}/opensuse/ocs-url.spec \ $${PWD}/archlinux/PKGBUILD \ $${PWD}/snap/snapcraft.yaml \ $${PWD}/snap/snap/gui/ocs-url.desktop \ diff --git a/scripts/build-docker.sh b/scripts/build-docker.sh index ee6403b45d7d4084c83f4c6a3b29c0090bc114dc..449b375ed38a0f037a41b77df901bebc93ae2b74 100644 --- a/scripts/build-docker.sh +++ b/scripts/build-docker.sh @@ -63,6 +63,22 @@ build_fedora() { transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.rpm")" } +build_opensuse() { + # docker-image: opensuse:42.1 + zypper --non-interactive refresh + zypper --non-interactive install make automake gcc gcc-c++ libtool libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qtdeclarative-devel + zypper --non-interactive install git rpm-build + zypper --non-interactive install curl + + useradd -m ${PKGUSER} + export HOME="/home/${PKGUSER}" + chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}" + + su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} + + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.rpm")" +} + build_archlinux() { # docker-image: base/archlinux:latest pacman -Syu --noconfirm @@ -117,6 +133,8 @@ if [ "${BUILDTYPE}" = 'ubuntu' ]; then build_ubuntu elif [ "${BUILDTYPE}" = 'fedora' ]; then build_fedora +elif [ "${BUILDTYPE}" = 'opensuse' ]; then + build_opensuse elif [ "${BUILDTYPE}" = 'archlinux' ]; then build_archlinux elif [ "${BUILDTYPE}" = 'snap' ]; then diff --git a/scripts/build.sh b/scripts/build.sh index a9969aa8a2a6326ad5e628428f3a3650fecd78d2..9f0dbb5bccc7aed312d37f24b0413bf8c47d9cce 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -47,6 +47,18 @@ build_fedora() { rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec" } +build_opensuse() { + cd "${PROJDIR}" + mkdir -p "${BUILDDIR}" + export_srcarchive "${SRCARCHIVE}" + + mkdir "${BUILDDIR}/SOURCES" + mkdir "${BUILDDIR}/SPECS" + mv "${SRCARCHIVE}" "${BUILDDIR}/SOURCES" + cp "${PROJDIR}/pkg/opensuse/${PKGNAME}.spec" "${BUILDDIR}/SPECS" + rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec" +} + build_archlinux() { cd "${PROJDIR}" mkdir -p "${BUILDDIR}" @@ -107,6 +119,8 @@ if [ "${BUILDTYPE}" = 'ubuntu' ]; then build_ubuntu elif [ "${BUILDTYPE}" = 'fedora' ]; then build_fedora +elif [ "${BUILDTYPE}" = 'opensuse' ]; then + build_opensuse elif [ "${BUILDTYPE}" = 'archlinux' ]; then build_archlinux elif [ "${BUILDTYPE}" = 'snap' ]; then