Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • akiraohgaki/ocs-url
  • ab3875o/ocs-url
  • dembego3/ocs-url
  • arakun/ocs-url
  • longviauroy/ocs-url
  • rolfen/ocs-url
  • hemm/ocs-url
  • simonsvw0000/ocs-url
  • dfn2/ocs-url
  • rws77/ocs-url
  • bitwalk/ocs-url
  • visdom/ocs-url
  • ricatfarker/ocs-url
  • mussah/ocs-url
  • tigefa/ocs-url
  • cobalt2727/ocs-url
  • ammark226/ocs-url
  • violethaze74/ocs-url
  • armedssault/ocs-url
  • billflick/ocs-url
  • kimblejeremy/ocs-url
  • yuvrajsm/ocs-url
  • wawmart/ocs-url
  • jhefry/ocs-url
  • robcdntruckin/ocs-url
  • bigmake2266/ocs-url
  • kamil-chbeir/ocs-url
  • jocker73/ocs-url
  • laboties/ocs-url
  • smekke61279-522014/ocs-url
  • coolduck/ocs-url
  • zulfikar-lahiya/ocs-url
  • faz-83/ocs-url
  • dado105/ocs-url
34 results
Show changes
Showing
with 261 additions and 574 deletions
No preview for this file type
No preview for this file type
No preview for this file type
File added
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_TW">
<context>
<name>OcsUrlHandler</name>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="37"/>
<source>Invalid OCS-URL</source>
<translation>無效的 OCS-URL</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="141"/>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="162"/>
<source>Failed to save data</source>
<translation>儲存資料失敗</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="148"/>
<source>The file has been downloaded</source>
<translation>檔案已被下載</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="176"/>
<source>The file has been installed as program</source>
<translation>檔案已被安裝為程式</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="180"/>
<source>The plasmoid has been installed</source>
<translation>Plasmoid 已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="184"/>
<source>The plasma look and feel has been installed</source>
<translation>Plasma 外觀與感覺已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="188"/>
<source>The plasma desktop theme has been installed</source>
<translation>Plasma 桌面主題已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="192"/>
<source>The KWin effect has been installed</source>
<translation>KWin 特效已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="196"/>
<source>The KWin script has been installed</source>
<translation>KWin 指令稿已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="200"/>
<source>The KWin window switcher has been installed</source>
<translation>KWin 視窗切換器已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="203"/>
<source>The archive file has been extracted</source>
<translation>封存檔已被解壓縮</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="206"/>
<source>The file has been installed</source>
<translation>檔案已被安裝</translation>
</message>
<message>
<location filename="../app/src/handlers/ocsurlhandler.cpp" line="210"/>
<source>Failed to installation</source>
<translation>安裝失敗</translation>
</message>
</context>
<context>
<name>main</name>
<message>
<location filename="../app/qml/main.qml" line="26"/>
<source>Download successful</source>
<translation>下載成功</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="27"/>
<source>Installation successful</source>
<translation>安裝成功</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="28"/>
<source>Validation error</source>
<translation>驗證失敗</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="29"/>
<source>Network error</source>
<translation>網路錯誤</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="30"/>
<source>Saving file failed</source>
<translation>儲存檔案失敗</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="31"/>
<source>Installation failed</source>
<translation>安裝失敗</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="56"/>
<source>Downloading</source>
<translation>正在下載</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="66"/>
<source>Do you want to download?</source>
<translation>您想要下載嗎</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="69"/>
<source>Do you want to install?</source>
<translation>您想要安裝嗎</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="73"/>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="74"/>
<source>File</source>
<translation>檔案</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="75"/>
<source>Type</source>
<translation>類型</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="80"/>
<source>Invalid OCS-URL</source>
<translation>無效的 OCS-URL</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="96"/>
<location filename="../app/qml/main.qml" line="109"/>
<location filename="../app/qml/main.qml" line="125"/>
<source>Details</source>
<translation>詳細資訊</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="98"/>
<source>OK</source>
<translation>確定</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="100"/>
<location filename="../app/qml/main.qml" line="160"/>
<source>Cancel</source>
<translation>取消</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="111"/>
<source>Open</source>
<translation>開啟</translation>
</message>
<message>
<location filename="../app/qml/main.qml" line="116"/>
<location filename="../app/qml/main.qml" line="127"/>
<source>Close</source>
<translation>關閉</translation>
</message>
</context>
</TS>
include($${PWD}/qtlib/qtlib.pri)
include($${PWD}/qtil/qtil.pri)
message("Please execute scripts/import.sh for build dependencies")
TARGET = ocs-url
TEMPLATE = app
CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS
DISTFILES += $${PWD}/README.md
......
#!/bin/bash
# The purpose of this script is to provide lightweight desktop integration
# into the host system without special help from the host system.
# If you want to have fuller and automatic desktop integration, you might
# consider to use the optional appimaged daemon instead.
# Exit on errors
set -e
# Be verbose if $DEBUG=1 is set
if [ ! -z "$DEBUG" ] ; then
env
set -x
fi
THIS="$0"
args=("$@") # http://stackoverflow.com/questions/3190818/
NUMBER_OF_ARGS="$#"
# Please do not change $VENDORPREFIX as it will allow for desktop files
# belonging to AppImages to be recognized by future AppImageKit components
# such as desktop integration daemons
VENDORPREFIX=appimagekit
APPDIR="$(dirname "$(readlink -f "${THIS}")")"
BIN="${APPDIR}/ocs-url"
export PATH="${APPDIR}/usr/bin:$PATH"
trap atexit EXIT
# Note that the following handles 0, 1 or more arguments (file paths)
# which can include blanks but uses a bashism; can the same be achieved
# in POSIX-shell? (FIXME)
# http://stackoverflow.com/questions/3190818
atexit()
{
if [ $NUMBER_OF_ARGS -eq 0 ] ; then
exec "${BIN}"
else
exec "${BIN}" "${args[@]}"
fi
}
error()
{
if [ -x /usr/bin/zenity ] ; then
LD_LIBRARY_PATH="" zenity --error --text "${1}" 2>/dev/null
elif [ -x /usr/bin/kdialog ] ; then
LD_LIBRARY_PATH="" kdialog --msgbox "${1}" 2>/dev/null
elif [ -x /usr/bin/Xdialog ] ; then
LD_LIBRARY_PATH="" Xdialog --msgbox "${1}" 2>/dev/null
else
echo "${1}"
fi
exit 1
}
yesno()
{
TITLE=$1
TEXT=$2
if [ -x /usr/bin/zenity ] ; then
LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2>/dev/null || exit 0
elif [ -x /usr/bin/kdialog ] ; then
LD_LIBRARY_PATH="" kdialog --caption "" --title "$TITLE" -yesno "$TEXT" || exit 0
elif [ -x /usr/bin/Xdialog ] ; then
LD_LIBRARY_PATH="" Xdialog --title "$TITLE" --clear --yesno "$TEXT" 10 80 || exit 0
else
echo "zenity, kdialog, Xdialog missing. Skipping ${THIS}."
exit 0
fi
}
check_prevent()
{
FILE=$1
if [ -e "$FILE" ] ; then
exit 0
fi
}
# Exit immediately of one of these files is present
# (e.g., because the desktop environment wants to handle desktop integration itself)
check_prevent "$HOME/.local/share/$VENDORPREFIX/no_desktopintegration"
check_prevent "/usr/share/$VENDORPREFIX/no_desktopintegration"
check_prevent "/etc/$VENDORPREFIX/no_desktopintegration"
# Exit immediately if appimaged is running
pidof appimaged 2>/dev/null && exit 0
# Exit immediately if $DESKTOPINTEGRATION is not empty
if [ ! -z "$DESKTOPINTEGRATION" ] ; then
exit 0
fi
check_dep()
{
DEP=$1
if [ -z $(which $DEP) ] ; then
echo "$DEP is missing. Skipping ${THIS}."
exit 0
fi
}
DIRNAME="$APPDIR"
# Check whether dependencies are present in base system (we do not bundle these)
# http://cgit.freedesktop.org/xdg/desktop-file-utils/
check_dep desktop-file-validate
check_dep update-desktop-database
check_dep desktop-file-install
check_dep xdg-icon-resource
check_dep xdg-mime
check_dep xdg-desktop-menu
DESKTOPFILE=$(find "$APPDIR" -maxdepth 1 -name "*.desktop" | head -n 1)
# echo "$DESKTOPFILE"
DESKTOPFILE_NAME=$(basename "${DESKTOPFILE}")
if [ ! -f "$DESKTOPFILE" ] ; then
echo "Desktop file is missing. Please run ${THIS} from within an AppImage."
exit 0
fi
if [ -z "$APPIMAGE" ] ; then
APPIMAGE="$APPDIR/AppRun"
# Not running from within an AppImage; hence using the AppRun for Exec=
fi
ABS_APPIMAGE=$(readlink -e "$APPIMAGE")
ICONFILE="$APPDIR/.DirIcon"
# $XDG_DATA_DIRS contains the default paths /usr/local/share:/usr/share
# desktop file has to be installed in an applications subdirectory
# of one of the $XDG_DATA_DIRS components
if [ -z "$XDG_DATA_DIRS" ] ; then
XDG_DATA_DIRS=/usr/local/share:/usr/share
fi
# Determine where the desktop file should be installed
if [[ $EUID -ne 0 ]]; then
DESTINATION_DIR_DESKTOP="$HOME/.local/share/applications"
SYSTEM_WIDE=""
else
# TODO: Check $XDG_DATA_DIRS
DESTINATION_DIR_DESKTOP="/usr/local/share/applications"
SYSTEM_WIDE="--mode system" # for xdg-mime and xdg-icon-resource
fi
# Check if the desktop file is already there
# and if so, whether it points to the same AppImage
if [ -e "$DESTINATION_DIR_DESKTOP/$VENDORPREFIX-$DESKTOPFILE_NAME" ] ; then
# echo "$DESTINATION_DIR_DESKTOP/$VENDORPREFIX-$DESKTOPFILE_NAME already there"
EXEC=$(grep "^Exec=" "$DESTINATION_DIR_DESKTOP/$VENDORPREFIX-$DESKTOPFILE_NAME" | head -n 1 | cut -d " " -f 1)
# echo $EXEC
if [ "Exec=\"$APPIMAGE\"" == "$EXEC" ] ; then
exit 0
fi
fi
# We ask the user only if we have found no reason to skip until here
if [ -z "$SKIP" ] ; then
yesno "Install" "Would you like to integrate $APPIMAGE with your system?\n\nThis will add it to your applications menu and install icons.\nIf you don't do this you can still launch the application by double-clicking on the AppImage."
fi
APP=$(echo "$DESKTOPFILE_NAME" | sed -e 's/.desktop//g')
# If the user has agreed, rewrite and install the desktop file, and the MIME information
if [ -z "$SKIP" ] ; then
# desktop-file-install is supposed to install .desktop files to the user's
# applications directory when run as a non-root user,
# and to /usr/share/applications if run as root
# but that does not really work for me...
#
# For Exec we must use quotes
# For TryExec quotes is not supported, so, space must be replaced to \s
# https://askubuntu.com/questions/175404/how-to-add-space-to-exec-path-in-a-thumbnailer-descrption/175567
desktop-file-install --rebuild-mime-info-cache \
--vendor=$VENDORPREFIX --set-key=Exec --set-value="\"${APPIMAGE}\" %u" \
--set-key=X-AppImage-Comment --set-value="Generated by ${THIS}" \
--set-icon="$ICONFILE" --set-key=TryExec --set-value=${APPIMAGE// /\\s} "$DESKTOPFILE" \
--dir "$DESTINATION_DIR_DESKTOP"
chmod a+x "$DESTINATION_DIR_DESKTOP/"*
RESOURCE_NAME=$(echo "$VENDORPREFIX-$DESKTOPFILE_NAME" | sed -e 's/.desktop//g')
# echo $RESOURCE_NAME
# Install the icon files for the application; TODO: scalable
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/apps/${APP}.png" 2>/dev/null || true)
for ICON in $ICONS ; do
ICON_SIZE=$(echo "${ICON}" | rev | cut -d "/" -f 3 | rev | cut -d "x" -f 1)
xdg-icon-resource install --context apps --size ${ICON_SIZE} "${ICON}" "${RESOURCE_NAME}"
done
# Install mime type
find "${APPDIR}/usr/share/mime/" -type f -name *xml -exec xdg-mime install $SYSTEM_WIDE --novendor {} \; 2>/dev/null || true
# Install the icon files for the mime type; TODO: scalable
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/mimetypes/*.png" 2>/dev/null || true)
for ICON in $ICONS ; do
ICON_SIZE=$(echo "${ICON}" | rev | cut -d "/" -f 3 | rev | cut -d "x" -f 1)
xdg-icon-resource install --context mimetypes --size ${ICON_SIZE} "${ICON}" $(basename $ICON | sed -e 's/.png//g')
done
xdg-desktop-menu forceupdate
gtk-update-icon-cache # for MIME
fi
# Maintainer: Akira Ohgaki <akiraohgaki@gmail.com>
pkgname='ocs-url'
pkgver='3.0.0'
pkgver='3.1.0'
pkgrel='1'
pkgdesc='An install helper program for items served on OpenCollaborationServices (OCS).'
pkgdesc='An install helper program for items served via OpenCollaborationServices (ocs://).'
arch=('i686' 'x86_64')
url='https://github.com/opendesktop/ocs-url'
url='https://git.opendesktop.org/akiraohgaki/ocs-url'
license=('GPL3')
depends=('qt5-base>=5.2.0' 'qt5-svg>=5.2.0' 'qt5-declarative>=5.2.0' 'qt5-quickcontrols>=5.2.0')
makedepends=('git')
#source=("https://github.com/opendesktop/ocs-url/archive/release-${pkgver}.tar.gz")
#source=("https://git.opendesktop.org/akiraohgaki/ocs-url/-/archive/release-${pkgver}/ocs-url-release-${pkgver}.tar.gz")
source=("${pkgname}.tar.gz")
md5sums=() #autofill using updpkgsums
prepare() {
#cd "${pkgname}-release-${pkgver}"
cd "${pkgname}"
sh scripts/import.sh
./scripts/prepare
}
build() {
#cd "${pkgname}-release-${pkgver}"
cd "${pkgname}"
qmake PREFIX="/usr"
qmake PREFIX=/usr
make
}
......
Summary: OCS-URL
Name: ocs-url
Version: 3.0.0
Version: 3.1.0
Release: 1%{?dist}
License: GPLv3+
Group: Applications/Internet
URL: https://github.com/opendesktop/ocs-url
URL: https://git.opendesktop.org/akiraohgaki/ocs-url
#Source0: https://github.com/opendesktop/ocs-url/archive/release-%{version}.tar.gz
#Source0: https://git.opendesktop.org/akiraohgaki/ocs-url/-/archive/release-%{version}/ocs-url-release-%{version}.tar.gz
Source0: %{name}.tar.gz
Requires: qt5-qtbase >= 5.2.0, qt5-qtbase-gui >= 5.2.0, qt5-qtsvg >= 5.2.0, qt5-qtdeclarative >= 5.2.0, qt5-qtquickcontrols >= 5.2.0
BuildRequires: make, automake, gcc, gcc-c++, libtool, qt5-qtbase-devel >= 5.2.0, qt5-qtsvg-devel >= 5.2.0, qt5-qtdeclarative-devel >= 5.2.0, git, rpm-build
BuildRequires: git, make, automake, gcc, gcc-c++, libtool, qt5-qtbase-devel >= 5.2.0, qt5-qtsvg-devel >= 5.2.0, qt5-qtdeclarative-devel >= 5.2.0, rpm-build
%description
An install helper program for items served on OpenCollaborationServices (OCS).
An install helper program for items served via OpenCollaborationServices (ocs://).
%prep
#%%autosetup -n %{name}-release-%{version}
%autosetup -n %{name}
sh scripts/import.sh
./scripts/prepare
%build
%define debug_package %{nil}
qmake-qt5 PREFIX="/usr"
qmake-qt5 PREFIX=/usr
make
%install
......@@ -38,6 +38,23 @@ make INSTALL_ROOT="%{buildroot}" install
rm -rf %{buildroot}
%changelog
* Thu Jul 05 2018 Akira Ohgaki <akiraohgaki@gmail.com> - 3.1.0-1
- Drop old xdg:// and xdgs:// schemes
- Update library
* Tue Feb 06 2018 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.3-1
- Update library
- Fix spelling
* Fri Jun 23 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.2-1
- Add zh_TW translations (by s8321414)
* Mon Jun 05 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.1-1
- Update qtlib
- Fix for C++11
- Fix installation/download destination
- Fix translation messages (by otsoga)
* Sun Mar 05 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.0-1
- Rename xdgurl to ocs-url
- Add ocs:// and ocss:// schemes
......
Summary: OCS-URL
Name: ocs-url
Version: 3.0.0
Version: 3.1.0
Release: 1%{?dist}
License: GPLv3+
Group: Applications/Internet
URL: https://github.com/opendesktop/ocs-url
URL: https://git.opendesktop.org/akiraohgaki/ocs-url
#Source0: https://github.com/opendesktop/ocs-url/archive/release-%{version}.tar.gz
#Source0: https://git.opendesktop.org/akiraohgaki/ocs-url/-/archive/release-%{version}/ocs-url-release-%{version}.tar.gz
Source0: %{name}.tar.gz
Requires: libQt5Svg5 >= 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
BuildRequires: git, make, automake, gcc, gcc-c++, libtool, libqt5-qtbase-devel >= 5.2.0, libqt5-qtsvg-devel >= 5.2.0, libqt5-qtdeclarative-devel >= 5.2.0, rpm-build
%description
An install helper program for items served on OpenCollaborationServices (OCS).
An install helper program for items served via OpenCollaborationServices (ocs://).
%prep
#%%autosetup -n %{name}-release-%{version}
%autosetup -n %{name}
sh scripts/import.sh
./scripts/prepare
%build
%define debug_package %{nil}
qmake-qt5 PREFIX="/usr"
qmake-qt5 PREFIX=/usr
make
%install
......@@ -38,6 +38,23 @@ make INSTALL_ROOT="%{buildroot}" install
rm -rf %{buildroot}
%changelog
* Thu Jul 05 2018 Akira Ohgaki <akiraohgaki@gmail.com> - 3.1.0-1
- Drop old xdg:// and xdgs:// schemes
- Update library
* Tue Feb 06 2018 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.3-1
- Update library
- Fix spelling
* Fri Jun 23 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.2-1
- Add zh_TW translations (by s8321414)
* Mon Jun 05 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.1-1
- Update qtlib
- Fix for C++11
- Fix installation/download destination
- Fix translation messages (by otsoga)
* Sun Mar 05 2017 Akira Ohgaki <akiraohgaki@gmail.com> - 3.0.0-1
- Rename xdgurl to ocs-url
- Add ocs:// and ocss:// schemes
......
......@@ -7,7 +7,4 @@ DISTFILES += \
$${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 \
$${PWD}/appimage/appimage-desktopintegration_ocs-url
$${PWD}/archlinux/PKGBUILD
[Desktop Entry]
Name=ocs-url
Exec=ocs-url.ocs-url %u
Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/ocs-url.svg
Type=Application
Terminal=false
NoDisplay=true
Categories=Network;Utility;
MimeType=x-scheme-handler/ocs;x-scheme-handler/ocss;x-scheme-handler/xdg;x-scheme-handler/xdgs;
name: ocs-url
version: '0.0.0'
summary: OCS-URL
description: |
An install helper program for items served on OpenCollaborationServices (OCS).
grade: devel
confinement: strict
icon: desktop/ocs-url.svg
parts:
ocs-url:
prepare: |
sh scripts/import.sh
plugin: qmake
source: ./
qt-version: qt5
options:
- PREFIX="/usr"
build-packages:
- build-essential
- qt5-default
- libqt5svg5-dev
- qtdeclarative5-dev
- git
- snapcraft
stage-packages:
- libqt5svg5
- qml-module-qtquick-controls
after:
- desktop-qt5
apps:
ocs-url:
command: usr/bin/ocs-url
plugs:
- home
- network
- opengl
- x11
- unity7
ocs-url (3.1.0-0ubuntu1) trusty; urgency=low
* Drop old xdg:// and xdgs:// schemes
* Update library
-- Akira Ohgaki <akiraohgaki@gmail.com> Thu, 05 Jul 2018 05:43:18 +0000
ocs-url (3.0.3-0ubuntu1) trusty; urgency=low
* Update library
* Fix spelling
-- Akira Ohgaki <akiraohgaki@gmail.com> Tue, 06 Feb 2018 12:00:06 +0000
ocs-url (3.0.2-0ubuntu1) trusty; urgency=low
* Add zh_TW translations (by s8321414)
-- Akira Ohgaki <akiraohgaki@gmail.com> Fri, 23 Jun 2017 13:20:37 +0000
ocs-url (3.0.1-0ubuntu1) trusty; urgency=low
* Update qtlib
* Fix for C++11
* Fix installation/download destination
* Fix translation messages (by otsoga)
-- Akira Ohgaki <akiraohgaki@gmail.com> Mon, 05 Jun 2017 04:33:07 +0000
ocs-url (3.0.0-0ubuntu1) trusty; urgency=low
* Rename xdgurl to ocs-url
......
......@@ -2,11 +2,11 @@ Source: ocs-url
Section: web
Priority: optional
Maintainer: Akira Ohgaki <akiraohgaki@gmail.com>
Build-Depends: build-essential, qt5-default (>= 5.2.0), libqt5svg5-dev (>= 5.2.0), qtdeclarative5-dev (>= 5.2.0), git, devscripts, debhelper, fakeroot
Build-Depends: git, build-essential, qt5-default (>= 5.2.0), libqt5svg5-dev (>= 5.2.0), qtdeclarative5-dev (>= 5.2.0), devscripts, debhelper, fakeroot
Standards-Version: 3.9.4
Package: ocs-url
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5svg5 (>= 5.2.0), qml-module-qtquick2 (>= 5.2.0) | qtdeclarative5-qtquick2-plugin (>= 5.2.0), qml-module-qtquick-window2 (>= 5.2.0) | qtdeclarative5-window-plugin (>= 5.2.0), qml-module-qtquick-controls (>= 5.2.0) | qtdeclarative5-controls-plugin (>= 5.2.0)
Description: OCS-URL
An install helper program for items served on OpenCollaborationServices (OCS).
An install helper program for items served via OpenCollaborationServices (ocs://).
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ocs-url
Upstream-Contact: Opendesktop.org <contact@opendesktop.org>
Source: https://github.com/opendesktop/ocs-url
Source: https://git.opendesktop.org/akiraohgaki/ocs-url
Files: *
Copyright: 2016-2017, Opendesktop.org
Copyright: 2016-2019, Opendesktop.org
License: GPL-3+
On Debian systems, the full text of the GNU General Public License version 3
can be found in the `/usr/share/common-licenses/GPL-3' file.
......@@ -4,8 +4,8 @@
dh $@
override_dh_auto_configure:
sh scripts/import.sh
qmake PREFIX="/usr"
./scripts/prepare
qmake PREFIX=/usr
override_dh_auto_install:
make INSTALL_ROOT="$(CURDIR)/debian/tmp" install
......
#!/bin/bash
################################################################################
# This is wrapper script for build.sh use from inside docker container
################################################################################
PKGNAME='ocs-url'
PKGUSER='pkgbuilder'
BUILDTYPE=''
if [ "${1}" ]; then
BUILDTYPE="${1}"
fi
PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDSCRIPT="${PROJDIR}/scripts/build.sh"
TRANSFERLOG="${PROJDIR}/transfer.log"
transfer_file() {
filepath="${1}"
if [ -f "${filepath}" ]; then
filename="$(basename "${filepath}")"
echo "Uploading ${filename}" >> "${TRANSFERLOG}"
curl -T "${filepath}" "https://transfer.sh/${filename}" >> "${TRANSFERLOG}"
fi
}
build_ubuntu() {
# docker-image: ubuntu:14.04
apt update -qq
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install git devscripts debhelper fakeroot
apt -y 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_"*${BUILDTYPE} -type f -name "${PKGNAME}*.deb")"
}
build_fedora() {
# docker-image: fedora:20
yum -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
yum -y install git rpm-build
yum -y install curl
# docker-image: fedora:22
#dnf -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
#dnf -y install git rpm-build
#dnf -y 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_"*${BUILDTYPE} -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_"*${BUILDTYPE} -type f -name "${PKGNAME}*.rpm")"
}
build_archlinux() {
# docker-image: base/archlinux:latest
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols
pacman -S --noconfirm git
pacman -S --noconfirm curl
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_"*${BUILDTYPE} -type f -name "${PKGNAME}*.pkg.tar.xz")"
}
build_snap() {
# docker-image: ubuntu:16.04
apt update -qq
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install git snapcraft
apt -y 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_"*${BUILDTYPE} -type f -name "${PKGNAME}*.snap")"
}
build_appimage() {
# docker-image: ubuntu:14.04
apt update -qq
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install git fuse zsync desktop-file-utils
apt -y install curl
modprobe fuse
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_"*${BUILDTYPE} -type f -name "${PKGNAME}*.AppImage")"
}
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
build_snap
elif [ "${BUILDTYPE}" = 'appimage' ]; then
build_appimage
else
echo "sh $(basename "${0}") [ubuntu|fedora|archlinux|snap|appimage]"
exit 1
fi
#!/bin/bash
################################################################################
# This is utility script to build distribution packages
################################################################################
PKGNAME='ocs-url'
BUILDTYPE=''
if [ "${1}" ]; then
BUILDTYPE="${1}"
fi
PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDVER="$(cd "${PROJDIR}" && git describe --always)"
BUILDDIR="${PROJDIR}/build_${PKGNAME}_${BUILDVER}_${BUILDTYPE}"
SRCARCHIVE="${BUILDDIR}/${PKGNAME}.tar.gz"
export_srcarchive() {
filepath="${1}"
$(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${filepath}" HEAD)
}
build_ubuntu() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${SRCARCHIVE}"
tar -xzvf "${SRCARCHIVE}" -C "${BUILDDIR}"
cp -r "${PROJDIR}/pkg/ubuntu/debian" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
debuild -uc -us -b
}
build_fedora() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${SRCARCHIVE}"
mkdir "${BUILDDIR}/SOURCES"
mkdir "${BUILDDIR}/SPECS"
mv "${SRCARCHIVE}" "${BUILDDIR}/SOURCES"
cp "${PROJDIR}/pkg/fedora/${PKGNAME}.spec" "${BUILDDIR}/SPECS"
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}"
export_srcarchive "${SRCARCHIVE}"
cp "${PROJDIR}/pkg/archlinux/PKGBUILD" "${BUILDDIR}"
cd "${BUILDDIR}"
updpkgsums
makepkg -s
}
build_snap() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${SRCARCHIVE}"
tar -xzvf "${SRCARCHIVE}" -C "${BUILDDIR}"
cp "${PROJDIR}/pkg/snap/snapcraft.yaml" "${BUILDDIR}/${PKGNAME}"
cp -r "${PROJDIR}/pkg/snap/snap" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
snapcraft
}
build_appimage() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${SRCARCHIVE}"
tar -xzvf "${SRCARCHIVE}" -C "${BUILDDIR}"
cd "${BUILDDIR}/${PKGNAME}"
sh scripts/import.sh
qmake
make
strip "${PKGNAME}"
cd "${BUILDDIR}"
# Replace linuxdeployqt download URL to official download URL when the stable version released
curl -L -o linuxdeployqt https://dl.dropboxusercontent.com/u/150776/temp/linuxdeployqt-799f704-x86-64.appimage
chmod 755 linuxdeployqt
mkdir -p "${BUILDDIR}/${PKGNAME}.AppDir/usr/bin"
install -m 755 -p "${BUILDDIR}/${PKGNAME}/${PKGNAME}" "${BUILDDIR}/${PKGNAME}.AppDir/${PKGNAME}"
install -m 644 -p "${BUILDDIR}/${PKGNAME}/desktop/${PKGNAME}.desktop" "${BUILDDIR}/${PKGNAME}.AppDir/${PKGNAME}.desktop"
install -m 644 -p "${BUILDDIR}/${PKGNAME}/desktop/${PKGNAME}.svg" "${BUILDDIR}/${PKGNAME}.AppDir/${PKGNAME}.svg"
install -m 755 -p /usr/bin/update-desktop-database "${BUILDDIR}/${PKGNAME}.AppDir/usr/bin/update-desktop-database"
install -m 755 -p /usr/bin/desktop-file-validate "${BUILDDIR}/${PKGNAME}.AppDir/usr/bin/desktop-file-validate"
install -m 755 -p /usr/bin/desktop-file-install "${BUILDDIR}/${PKGNAME}.AppDir/usr/bin/desktop-file-install"
./linuxdeployqt "${BUILDDIR}/${PKGNAME}.AppDir/${PKGNAME}" -qmldir="${BUILDDIR}/${PKGNAME}/app/qml" -verbose=2 -bundle-non-qt-libs # https://github.com/probonopd/linuxdeployqt/issues/25
./linuxdeployqt "${BUILDDIR}/${PKGNAME}.AppDir/${PKGNAME}" -qmldir="${BUILDDIR}/${PKGNAME}/app/qml" -verbose=2 -bundle-non-qt-libs # twice because of #25
rm "${BUILDDIR}/${PKGNAME}.AppDir/AppRun"
install -m 755 -p "${BUILDDIR}/${PKGNAME}/pkg/appimage/appimage-desktopintegration_${PKGNAME}" "${BUILDDIR}/${PKGNAME}.AppDir/AppRun"
./linuxdeployqt --appimage-extract
./squashfs-root/usr/bin/appimagetool "${BUILDDIR}/${PKGNAME}.AppDir"
}
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
build_snap
elif [ "${BUILDTYPE}" = 'appimage' ]; then
build_appimage
else
echo "sh $(basename "${0}") [ubuntu|fedora|archlinux|snap|appimage]"
exit 1
fi