From efbc7433629184fe2dd75d18792858201d44e752 Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Tue, 20 Oct 2020 08:57:39 +0200 Subject: [PATCH] Add minimal package --- dist/deb/minimal/debian.changelog | 7 ++ dist/deb/minimal/debian.compat | 1 + dist/deb/minimal/debian.control | 19 ++++ dist/deb/minimal/debian.rules | 117 +++++++++++++++++++++ dist/deb/minimal/systray-x-minimal.dsc | 7 ++ dist/rpm/minimal/_service | 24 +++++ dist/rpm/minimal/systray-x-minimal.changes | 9 ++ dist/rpm/minimal/systray-x-minimal.spec | 84 +++++++++++++++ update_version.sh | 4 + 9 files changed, 272 insertions(+) create mode 100644 dist/deb/minimal/debian.changelog create mode 100644 dist/deb/minimal/debian.compat create mode 100644 dist/deb/minimal/debian.control create mode 100644 dist/deb/minimal/debian.rules create mode 100644 dist/deb/minimal/systray-x-minimal.dsc create mode 100644 dist/rpm/minimal/_service create mode 100644 dist/rpm/minimal/systray-x-minimal.changes create mode 100644 dist/rpm/minimal/systray-x-minimal.spec diff --git a/dist/deb/minimal/debian.changelog b/dist/deb/minimal/debian.changelog new file mode 100644 index 0000000..8f07204 --- /dev/null +++ b/dist/deb/minimal/debian.changelog @@ -0,0 +1,7 @@ +systray-x-minimal (0.4.0-1) unstable; urgency=low + + * Update to 0.4.0 + +systray-x-minimal (0.0.1-1) unstable; urgency=low + + * Initial Release diff --git a/dist/deb/minimal/debian.compat b/dist/deb/minimal/debian.compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/dist/deb/minimal/debian.compat @@ -0,0 +1 @@ +5 diff --git a/dist/deb/minimal/debian.control b/dist/deb/minimal/debian.control new file mode 100644 index 0000000..d96f71d --- /dev/null +++ b/dist/deb/minimal/debian.control @@ -0,0 +1,19 @@ +Source: systray-x-minimal +Section: misc +Priority: optional +Maintainer: Maxime Rijnders +Build-Depends: debhelper (>= 4.1.16), zip, qt5-default, qtbase5-dev, qdbus-qt5, thunderbird + +Package: systray-x-minimal +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/minimal/debian.rules b/dist/deb/minimal/debian.rules new file mode 100644 index 0000000..9044177 --- /dev/null +++ b/dist/deb/minimal/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 OPTIONS="DEFINES+=NO_KDE_INTEGRATION" 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-minimal/usr/bin + cp -f SysTray-X /usr/src/packages/BUILD/debian/systray-x-minimal/usr/bin/SysTray-X + + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/mozilla/native-messaging-hosts + cp -f SysTray_X.json /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/mozilla/native-messaging-hosts/SysTray_X.json + +ifeq (Debian,$(DEB_VENDOR)) + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird/extensions + cd /usr/src/packages/BUILD/debian/systray-x-minimal/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-minimal/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-minimal/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/minimal/systray-x-minimal.dsc b/dist/deb/minimal/systray-x-minimal.dsc new file mode 100644 index 0000000..029fa75 --- /dev/null +++ b/dist/deb/minimal/systray-x-minimal.dsc @@ -0,0 +1,7 @@ +Format: 1.0 +Source: systray-x-minimal +Version: 0 +Binary: systray-x-minimal +Maintainer: Maxime Rijnders +Architecture: any +Build-Depends: debhelper (>= 4.1.16), zip, qt5-default, qtbase5-dev, qdbus-qt5, thunderbird diff --git a/dist/rpm/minimal/_service b/dist/rpm/minimal/_service new file mode 100644 index 0000000..9feb4c2 --- /dev/null +++ b/dist/rpm/minimal/_service @@ -0,0 +1,24 @@ + + + https://github.com/Ximi1970/systray-x.git + git + 0.4.0 + 0.4.0 + systray-x-minimal + dist/rpm/gnome/systray-x-minimal.changes + dist/rpm/gnome/systray-x-minimal.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-minimal.dsc + + + + *.tar + xz + + + diff --git a/dist/rpm/minimal/systray-x-minimal.changes b/dist/rpm/minimal/systray-x-minimal.changes new file mode 100644 index 0000000..e0b58fa --- /dev/null +++ b/dist/rpm/minimal/systray-x-minimal.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Sat Oct 10 14:10:00 UTC 2020 - Maxime Rijnders + +- Initial package (v0~git20200127.65f5344) diff --git a/dist/rpm/minimal/systray-x-minimal.spec b/dist/rpm/minimal/systray-x-minimal.spec new file mode 100644 index 0000000..9720c93 --- /dev/null +++ b/dist/rpm/minimal/systray-x-minimal.spec @@ -0,0 +1,84 @@ +# +# spec file for package systray-x-minimal +# +# 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-minimal +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(Qt5DBus) +BuildRequires: pkgconfig(x11) +%if 0%{?fedora_version} +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} OPTIONS="DEFINES+=NO_KDE_INTEGRATION" 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 026f559..851d161 100755 --- a/update_version.sh +++ b/update_version.sh @@ -10,6 +10,10 @@ 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 +SERVICE_FILE="./dist/rpm/minimal/_service" +sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE +sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE + MANIFEST_FILE="./webext/manifest.json" sed -i -e "s?\(^.*\"version\": \"\).*\(\",\)?\1$VERSION\2?" $MANIFEST_FILE