From d531b9cd0851fc8825a63aee3ae48fc2c5ac45eb Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Mon, 11 May 2020 14:24:17 +0200 Subject: [PATCH] Seperate KDE and GNOME packages --- Makefile | 4 +- app/build.bat | 4 +- dist/deb/{ => gnome}/debian.changelog | 0 dist/deb/{ => gnome}/debian.compat | 0 dist/deb/{ => gnome}/debian.control | 1 + dist/deb/{ => gnome}/debian.postinst | 0 dist/deb/{ => gnome}/debian.rules | 0 .../systray-x-gnome.dsc} | 0 dist/deb/kde/debian.changelog | 3 + dist/deb/kde/debian.compat | 1 + dist/deb/kde/debian.control | 19 +++ dist/deb/kde/debian.rules | 117 ++++++++++++++++++ dist/deb/kde/systray-x.dsc | 7 ++ dist/rpm/gnome/_service | 23 ++++ .../systray-x-gnome.changes} | 0 .../systray-x-gnome.spec} | 6 +- dist/rpm/{ => kde}/_service | 16 +-- dist/rpm/kde/systray-x.changes | 4 + dist/rpm/kde/systray-x.spec | 84 +++++++++++++ update_version.sh | 6 +- 20 files changed, 279 insertions(+), 16 deletions(-) rename dist/deb/{ => gnome}/debian.changelog (100%) rename dist/deb/{ => gnome}/debian.compat (100%) rename dist/deb/{ => gnome}/debian.control (96%) rename dist/deb/{ => gnome}/debian.postinst (100%) rename dist/deb/{ => gnome}/debian.rules (100%) rename dist/deb/{systray-x.dsc => gnome/systray-x-gnome.dsc} (100%) create mode 100644 dist/deb/kde/debian.changelog create mode 100644 dist/deb/kde/debian.compat create mode 100644 dist/deb/kde/debian.control create mode 100644 dist/deb/kde/debian.rules create mode 100644 dist/deb/kde/systray-x.dsc create mode 100644 dist/rpm/gnome/_service rename dist/rpm/{systray-x.changes => gnome/systray-x-gnome.changes} (100%) rename dist/rpm/{systray-x.spec => gnome/systray-x-gnome.spec} (97%) rename dist/rpm/{ => kde}/_service (52%) create mode 100644 dist/rpm/kde/systray-x.changes create mode 100644 dist/rpm/kde/systray-x.spec diff --git a/Makefile b/Makefile index 5174d3e..f3b8322 100644 --- a/Makefile +++ b/Makefile @@ -67,10 +67,10 @@ systray-x-app: mkdir -p app/build32 ;\ mkdir -p app/dist/win32 ;\ cd app/build32 ;\ - ../build.bat x86 5.14.1 ;\ + ../build.bat x86 5.14.2 ;\ cd ../.. ;\ mkdir -p app/build64 ;\ cd app/build64 ;\ - ../build.bat x86_64 5.14.1 ;\ + ../build.bat x86_64 5.14.2 ;\ cd ../.. endif diff --git a/app/build.bat b/app/build.bat index 190d990..d303a0b 100644 --- a/app/build.bat +++ b/app/build.bat @@ -25,8 +25,8 @@ if "%ARCH%" == "" ( ) set QT_VER= -if /I "%2"=="5.14.1" ( - set QT_VER=5.14.1 +if /I "%2"=="5.14.2" ( + set QT_VER=5.14.2 ) if "%QT_VER%" == "" ( goto :usage diff --git a/dist/deb/debian.changelog b/dist/deb/gnome/debian.changelog similarity index 100% rename from dist/deb/debian.changelog rename to dist/deb/gnome/debian.changelog diff --git a/dist/deb/debian.compat b/dist/deb/gnome/debian.compat similarity index 100% rename from dist/deb/debian.compat rename to dist/deb/gnome/debian.compat diff --git a/dist/deb/debian.control b/dist/deb/gnome/debian.control similarity index 96% rename from dist/deb/debian.control rename to dist/deb/gnome/debian.control index f7eeefa..3e107ac 100644 --- a/dist/deb/debian.control +++ b/dist/deb/gnome/debian.control @@ -16,3 +16,4 @@ Description: SysTray-X is a system tray extension for Thunderbird 68+. * show / hide Thunderbird (minimize) * minimizing hides to tray * minimize on startup + * minimize on close diff --git a/dist/deb/debian.postinst b/dist/deb/gnome/debian.postinst similarity index 100% rename from dist/deb/debian.postinst rename to dist/deb/gnome/debian.postinst diff --git a/dist/deb/debian.rules b/dist/deb/gnome/debian.rules similarity index 100% rename from dist/deb/debian.rules rename to dist/deb/gnome/debian.rules diff --git a/dist/deb/systray-x.dsc b/dist/deb/gnome/systray-x-gnome.dsc similarity index 100% rename from dist/deb/systray-x.dsc rename to dist/deb/gnome/systray-x-gnome.dsc diff --git a/dist/deb/kde/debian.changelog b/dist/deb/kde/debian.changelog new file mode 100644 index 0000000..08157f0 --- /dev/null +++ b/dist/deb/kde/debian.changelog @@ -0,0 +1,3 @@ +systray-x (0.0.1-1) unstable; urgency=low + + * Initial Release diff --git a/dist/deb/kde/debian.compat b/dist/deb/kde/debian.compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/dist/deb/kde/debian.compat @@ -0,0 +1 @@ +5 diff --git a/dist/deb/kde/debian.control b/dist/deb/kde/debian.control new file mode 100644 index 0000000..a0e5705 --- /dev/null +++ b/dist/deb/kde/debian.control @@ -0,0 +1,19 @@ +Source: systray-x +Section: misc +Priority: optional +Maintainer: Maxime Rijnders +Build-Depends: debhelper (>= 4.1.16), zip, qt5-default, qtbase5-dev, thunderbird + +Package: systray-x +Architecture: any +Depends: ${shlibs:Depends}, thunderbird +Description: SysTray-X is a system tray extension for Thunderbird 68+. + The add-on uses the WebExtension API's to control an external system + dependent system tray application. + The add-on and system tray application can do: + * custom new mail icon + * display number of unread mails + * show / hide Thunderbird (minimize) + * minimizing hides to tray + * minimize on startup + * minimize on close diff --git a/dist/deb/kde/debian.rules b/dist/deb/kde/debian.rules new file mode 100644 index 0000000..3850705 --- /dev/null +++ b/dist/deb/kde/debian.rules @@ -0,0 +1,117 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +#export DH_COMPAT=4 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +DEB_VENDOR := $(shell dpkg-vendor --query vendor) + +VERSION := $(shell cat dist/rpm/VERSION | grep VERSION | sed -e "s/VERSION=\(.*\)/\1/") + +VERSION_MAJOR := $(shell echo $(VERSION) | cut -d'.' -f1) +VERSION_MINOR := $(shell echo $(VERSION) | cut -d'.' -f2) +VERSION_PATCH := $(shell echo $(VERSION) | cut -d'.' -f3) + +BUILD_NUMBER := $(shell cat dist/rpm/VERSION | grep BUILD_NUMBER | sed -e "s/BUILD_NUMBER=\(.*\)/\1/") +GIT_HASH := $(shell cat dist/rpm/VERSION | grep GIT_HASH | sed -e "s/GIT_HASH=\(.*\)/\1/") +GIT_BRANCH := $(shell cat dist/rpm/VERSION | grep GIT_BRANCH | sed -e "s/GIT_BRANCH=\(.*\)/\1/") + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + sed < app/config/linux/SysTray_X.json.template -e 's|SYSTRAY_X_PATH|/usr/bin/SysTray-X|' > SysTray_X.json + + make EXT_VERSION="DEFINES+=EXT_VERSION DEFINES+=APP_VERSION_MAJOR=\\\\\\\\\\\\\\\"$(VERSION_MAJOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_MINOR=\\\\\\\\\\\\\\\"$(VERSION_MINOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_PATCH=\\\\\\\\\\\\\\\"$(VERSION_PATCH)\\\\\\\\\\\\\\\" DEFINES+=APP_BUILD=\\\\\\\\\\\\\\\"$(BUILD_NUMBER)\\\\\\\\\\\\\\\" DEFINES+=APP_GITHASH=\\\\\\\\\\\\\\\"$(GIT_HASH)\\\\\\\\\\\\\\\" DEFINES+=APP_GITBRANCH=\\\\\\\\\\\\\\\"$(GIT_BRANCH)\\\\\\\\\\\\\\\"" + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + make clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/bin + cp -f SysTray-X /usr/src/packages/BUILD/debian/systray-x/usr/bin/SysTray-X + + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/mozilla/native-messaging-hosts + cp -f SysTray_X.json /usr/src/packages/BUILD/debian/systray-x/usr/lib/mozilla/native-messaging-hosts/SysTray_X.json + +ifeq (Debian,$(DEB_VENDOR)) + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird/extensions + cd /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird/extensions ;\ + ln -sf ../../thunderbird-addons/extensions/systray-x@Ximi1970.xpi systray-x@Ximi1970.xpi +else + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi +endif + + # --- end custom part for installing + +# 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_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary installing diff --git a/dist/deb/kde/systray-x.dsc b/dist/deb/kde/systray-x.dsc new file mode 100644 index 0000000..a4209ba --- /dev/null +++ b/dist/deb/kde/systray-x.dsc @@ -0,0 +1,7 @@ +Format: 1.0 +Source: systray-x +Version: 0 +Binary: SysTray-X +Maintainer: Maxime Rijnders +Architecture: any +Build-Depends: debhelper (>= 4.1.16), zip, qt5-default, qtbase5-dev, thunderbird diff --git a/dist/rpm/gnome/_service b/dist/rpm/gnome/_service new file mode 100644 index 0000000..671e7c8 --- /dev/null +++ b/dist/rpm/gnome/_service @@ -0,0 +1,23 @@ + + + https://github.com/Ximi1970/systray-x.git + git + 0.1.5 + 0.1.5 + dist/rpm/gnome/systray-x-gnome.changes + dist/rpm/gnome/systray-x-gnome.spec + dist/rpm/VERSION + dist/deb/gnome/debian.changelog + dist/deb/gnome/debian.compat + dist/deb/gnome/debian.control + dist/deb/gnome/debian.rules + dist/deb/gnome/debian.postinst + dist/deb/gnome/systray-x-gnome.dsc + + + + *.tar + xz + + + diff --git a/dist/rpm/systray-x.changes b/dist/rpm/gnome/systray-x-gnome.changes similarity index 100% rename from dist/rpm/systray-x.changes rename to dist/rpm/gnome/systray-x-gnome.changes diff --git a/dist/rpm/systray-x.spec b/dist/rpm/gnome/systray-x-gnome.spec similarity index 97% rename from dist/rpm/systray-x.spec rename to dist/rpm/gnome/systray-x-gnome.spec index 72875ca..5ba6b61 100644 --- a/dist/rpm/systray-x.spec +++ b/dist/rpm/gnome/systray-x-gnome.spec @@ -1,5 +1,5 @@ # -# spec file for package systray-x +# spec file for package systray-x-gnome # # Copyright (c) 2020 SUSE LLC # @@ -15,8 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # - -Name: systray-x +Name: systray-x-gnome Version: 0 Release: 0 Summary: A system tray extension for Thunderbird 68+ @@ -50,6 +49,7 @@ The add-on and system tray application can do: * show / hide Thunderbird (minimize) * minimizing hides to tray * minimize on startup + * minimize on close %prep %autosetup -p1 diff --git a/dist/rpm/_service b/dist/rpm/kde/_service similarity index 52% rename from dist/rpm/_service rename to dist/rpm/kde/_service index 0740f6a..f0d1219 100644 --- a/dist/rpm/_service +++ b/dist/rpm/kde/_service @@ -4,15 +4,15 @@ git 0.1.5 0.1.5 - dist/rpm/systray-x.changes - dist/rpm/systray-x.spec + dist/rpm/kde/systray-x.changes + dist/rpm/kde/systray-x.spec dist/rpm/VERSION - dist/deb/debian.changelog - dist/deb/debian.compat - dist/deb/debian.control - dist/deb/debian.rules - dist/deb/debian.postinst - dist/deb/systray-x.dsc + dist/deb/kde/debian.changelog + dist/deb/kde/debian.compat + dist/deb/kde/debian.control + dist/deb/kde/debian.rules + dist/deb/kde/debian.postinst + dist/deb/kde/systray-x.dsc diff --git a/dist/rpm/kde/systray-x.changes b/dist/rpm/kde/systray-x.changes new file mode 100644 index 0000000..e4e2685 --- /dev/null +++ b/dist/rpm/kde/systray-x.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Feb 11 19:05:19 UTC 2020 - Luigi Baldoni + +- Initial package (v0~git20200127.65f5344) diff --git a/dist/rpm/kde/systray-x.spec b/dist/rpm/kde/systray-x.spec new file mode 100644 index 0000000..daf04be --- /dev/null +++ b/dist/rpm/kde/systray-x.spec @@ -0,0 +1,84 @@ +# +# spec file for package systray-x +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +Name: systray-x +Version: 0 +Release: 0 +Summary: A system tray extension for Thunderbird 68+ +License: MPL-2.0 +Group: Productivity/Networking/Email/Clients +URL: https://github.com/Ximi1970/systray-x +Source0: %{name}-%{version}.tar.xz +Source1: VERSION +BuildRequires: unzip +BuildRequires: zip +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(x11) +%if 0%{?fedora_version} +Requires: qt5-qtwayland +Requires: thunderbird >= 68 +%else +Requires: MozillaThunderbird >= 68 +%endif + +%description +SysTray-X is a system tray extension for Thunderbird 68+. +The add-on uses the WebExtension API's to control an external system +dependent system tray application. + +The add-on and system tray application can do: + + * custom new mail icon + * display number of unread mails + * show / hide Thunderbird (minimize) + * minimizing hides to tray + * minimize on startup + * minimize on close + +%prep +%autosetup -p1 + +%build +export VERSION=`cat %{S:1} | grep VERSION | sed -e "s/VERSION=\(.*\)/\1/"` + +export VERSION_MAJOR=`echo $VERSION | cut -d'.' -f1` +export VERSION_MINOR=`echo $VERSION | cut -d'.' -f2` +export VERSION_PATCH=`echo $VERSION | cut -d'.' -f3` + +export BUILD_NUMBER=`cat %{S:1} | grep BUILD_NUMBER | sed -e "s/BUILD_NUMBER=\(.*\)/\1/"` +export GIT_HASH=`cat %{S:1} | grep GIT_HASH | sed -e "s/GIT_HASH=\(.*\)/\1/"` +export GIT_BRANCH=`cat %{S:1} | grep GIT_BRANCH | sed -e "s/GIT_BRANCH=\(.*\)/\1/"` + +make %{?_smp_mflags} EXT_VERSION="DEFINES+=EXT_VERSION DEFINES+=APP_VERSION_MAJOR=\\\\\\\\\\\\\\\"$VERSION_MAJOR\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_MINOR=\\\\\\\\\\\\\\\"$VERSION_MINOR\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_PATCH=\\\\\\\\\\\\\\\"$VERSION_PATCH\\\\\\\\\\\\\\\" DEFINES+=APP_BUILD=\\\\\\\\\\\\\\\"$BUILD_NUMBER\\\\\\\\\\\\\\\" DEFINES+=APP_GITHASH=\\\\\\\\\\\\\\\"$GIT_HASH\\\\\\\\\\\\\\\" DEFINES+=APP_GITBRANCH=\\\\\\\\\\\\\\\"$GIT_BRANCH\\\\\\\\\\\\\\\"" + +sed < app/config/linux/SysTray_X.json.template -e 's|SYSTRAY_X_PATH|%{_bindir}/SysTray-X|' > SysTray_X.json + +%install +_systx_dir=%{buildroot}%{_libdir}/mozilla/extensions/\{3550f703-e582-4d05-9a08-453d09bdfdc6\}/systray-x@Ximi1970 +install -Dm0755 SysTray-X %{buildroot}/%{_bindir}/SysTray-X +mkdir -pv $_systx_dir +unzip -d $_systx_dir systray-x@Ximi1970.xpi +install -Dm0644 SysTray_X.json %{buildroot}%{_libdir}/mozilla/native-messaging-hosts/SysTray_X.json + +%files +%license LICENSE +%doc README.md systray-x@Ximi1970.xpi +%{_bindir}/SysTray-X +%{_libdir}/mozilla + +%changelog diff --git a/update_version.sh b/update_version.sh index dbbe396..026f559 100755 --- a/update_version.sh +++ b/update_version.sh @@ -2,7 +2,11 @@ VERSION=$1 -SERVICE_FILE="./dist/rpm/_service" +SERVICE_FILE="./dist/rpm/kde/_service" +sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE +sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE + +SERVICE_FILE="./dist/rpm/gnome/_service" sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE