public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/user/dlang:master commit in: net-misc/onedrivegui/files/, net-misc/onedrivegui/
@ 2025-01-26 23:30 Gonçalo Negrier Duarte
  0 siblings, 0 replies; only message in thread
From: Gonçalo Negrier Duarte @ 2025-01-26 23:30 UTC (permalink / raw
  To: gentoo-commits

commit:     5653a89ff386f26ccd065fb38d17bb88aeba9601
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Sun Jan 26 23:07:45 2025 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Sun Jan 26 23:07:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=5653a89f

net-misc/onedrivegui: add 1.1.1-r1, 1.0.3-r2, drop 1.1.1, 1.0.3-r1
* update ebuilds to use distutils-r1

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com>

 net-misc/onedrivegui/files/OneDriveGUI           |  2 --
 net-misc/onedrivegui/files/OneDriveGUI.desktop   |  4 +--
 net-misc/onedrivegui/files/setup-onedrivegui.cfg | 40 +++++++++++++++++++++
 net-misc/onedrivegui/files/setup-onedrivegui.py  |  6 ++++
 net-misc/onedrivegui/onedrivegui-1.0.3-r1.ebuild | 33 -----------------
 net-misc/onedrivegui/onedrivegui-1.0.3-r2.ebuild | 46 ++++++++++++++++++++++++
 net-misc/onedrivegui/onedrivegui-1.1.1-r1.ebuild | 46 ++++++++++++++++++++++++
 net-misc/onedrivegui/onedrivegui-1.1.1.ebuild    | 33 -----------------
 net-misc/onedrivegui/onedrivegui-9999.ebuild     | 44 +++++++++++++++--------
 9 files changed, 170 insertions(+), 84 deletions(-)

diff --git a/net-misc/onedrivegui/files/OneDriveGUI b/net-misc/onedrivegui/files/OneDriveGUI
deleted file mode 100644
index 4286f78..0000000
--- a/net-misc/onedrivegui/files/OneDriveGUI
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/python /opt/OneDriveGUI/OneDriveGUI.py
\ No newline at end of file

diff --git a/net-misc/onedrivegui/files/OneDriveGUI.desktop b/net-misc/onedrivegui/files/OneDriveGUI.desktop
index 784f423..b87b5de 100644
--- a/net-misc/onedrivegui/files/OneDriveGUI.desktop
+++ b/net-misc/onedrivegui/files/OneDriveGUI.desktop
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Name=OneDriveGUI
 StartupNotify=true
-Exec=/usr/bin/python /opt/OneDriveGUI/OneDriveGUI.py
+Exec=OneDriveGUI
 Terminal=false
-Icon=OneDriveGUI
+Icon=/usr/share/pixmaps/OneDriveGUI.png
 Type=Application
\ No newline at end of file

diff --git a/net-misc/onedrivegui/files/setup-onedrivegui.cfg b/net-misc/onedrivegui/files/setup-onedrivegui.cfg
new file mode 100644
index 0000000..eb1af44
--- /dev/null
+++ b/net-misc/onedrivegui/files/setup-onedrivegui.cfg
@@ -0,0 +1,40 @@
+[metadata]
+name = OneDriveGUI
+version = _VERSION
+author = bpozdena
+author_email = bpozdena@example.org
+description = A simple GUI for OneDrive Linux client with multi-account support. 
+long_description = file: README.md
+license = GPL-3.0
+license_files = LICENSE
+long_description_content_type = text/markdown
+url = https://github.com/bpozdena/OneDriveGUI
+project_urls =
+    Bug Tracker = https://github.com/bpozdena/OneDriveGUI/-/issues
+    repository = https://github.com/bpozdena/OneDriveGUI
+classifiers =
+    Programming Language :: Python :: 3
+
+[options]
+python_requires = >=3.8
+packages = find:
+install_requires=
+    PySide6_Essentials
+    requests
+
+[options.packages.find]
+exclude =
+    tests
+
+[options.entry_points]
+console_scripts =
+    OneDriveGUI= src.OneDriveGUI:main
+
+[options.data_files]
+lib/OneDriveGUI/resource = src/resources/default_config
+lib/OneDriveGUI/resource/images = src/resources/images/*.*
+lib/OneDriveGUI/ui = src/ui/*.*
+share/pixmaps/ = 
+    src/resources/images/OneDriveGUI.png
+share/applications/ = 
+    src/OneDriveGUI.desktop
\ No newline at end of file

diff --git a/net-misc/onedrivegui/files/setup-onedrivegui.py b/net-misc/onedrivegui/files/setup-onedrivegui.py
new file mode 100644
index 0000000..45f160d
--- /dev/null
+++ b/net-misc/onedrivegui/files/setup-onedrivegui.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import setuptools
+
+if __name__ == "__main__":
+    setuptools.setup()
\ No newline at end of file

diff --git a/net-misc/onedrivegui/onedrivegui-1.0.3-r1.ebuild b/net-misc/onedrivegui/onedrivegui-1.0.3-r1.ebuild
deleted file mode 100644
index 1674677..0000000
--- a/net-misc/onedrivegui/onedrivegui-1.0.3-r1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-M_PN=OneDriveGUI
-
-inherit desktop
-SRC_URI="https://github.com/bpozdena/OneDriveGUI/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
-DESCRIPTION="A simple GUI for OneDrive Linux client, with multi-account support."
-HOMEPAGE="https://github.com/bpozdena/OneDriveGUI"
-
-RDEPEND="<=net-misc/onedrive-2.5.3
-	dev-python/requests
-	dev-python/pyside6[gui(+),webengine(+),widgets(+)]
-"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-
-S="${WORKDIR}/${M_PN}-${PV}"
-
-src_install() {
-	#Install binary and alias command
-	insinto /opt/OneDriveGUI/ && doins -r "${S}/src/resources" && doins -r "${S}/src/ui" && doins -r "${S}/src/OneDriveGUI.py"
-	insinto /opt/bin/ && doins "${FILESDIR}/OneDriveGUI"
-	fperms +x /opt/OneDriveGUI/OneDriveGUI.py /opt/bin/OneDriveGUI
-
-	#Icon and Desktop File
-	doicon "${S}/src/resources/images/OneDriveGUI.ico"
-	domenu "${FILESDIR}/OneDriveGUI.desktop"
-}

diff --git a/net-misc/onedrivegui/onedrivegui-1.0.3-r2.ebuild b/net-misc/onedrivegui/onedrivegui-1.0.3-r2.ebuild
new file mode 100644
index 0000000..71ac84a
--- /dev/null
+++ b/net-misc/onedrivegui/onedrivegui-1.0.3-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+M_PN=OneDriveGUI
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=(python3_{9..13})
+
+inherit desktop distutils-r1
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/bpozdena/${M_PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/bpozdena/${M_PN}/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
+	KEYWORDS="~amd64"
+    S="${WORKDIR}/${M_PN}-${PV}"
+fi
+
+DESCRIPTION="A simple GUI for OneDrive Linux client, with multi-account support."
+HOMEPAGE="https://github.com/bpozdena/OneDriveGUI"
+
+RDEPEND="<net-misc/onedrive-2.5
+	dev-python/requests
+	dev-python/pyside6[gui(+),webengine(+),widgets(+)]
+"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+src_prepare() {
+    cp "${FILESDIR}/setup-onedrivegui.py" "${S}/setup.py" || die
+    cp "${FILESDIR}/setup-onedrivegui.cfg" "${S}/setup.cfg" || die
+    cp "${FILESDIR}/OneDriveGUI.desktop" "${S}/src/OneDriveGUI.desktop" || die
+
+    if [[ ${PV} == "9999" ]]; then
+		#fix python package version
+		sed -i "s/version = _VERSION/version = 9999/g" "${S}/setup.cfg" || die
+	else
+		#fix python package version
+		sed -i "s/version = _VERSION/version = ${PV}/g" "${S}/setup.cfg" || die
+	fi
+
+    default
+}
\ No newline at end of file

diff --git a/net-misc/onedrivegui/onedrivegui-1.1.1-r1.ebuild b/net-misc/onedrivegui/onedrivegui-1.1.1-r1.ebuild
new file mode 100644
index 0000000..f73ebad
--- /dev/null
+++ b/net-misc/onedrivegui/onedrivegui-1.1.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+M_PN=OneDriveGUI
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=(python3_{9..13})
+
+inherit desktop distutils-r1
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/bpozdena/${M_PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/bpozdena/${M_PN}/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
+	KEYWORDS="~amd64"
+    S="${WORKDIR}/${M_PN}-${PV}"
+fi
+
+DESCRIPTION="A simple GUI for OneDrive Linux client, with multi-account support."
+HOMEPAGE="https://github.com/bpozdena/OneDriveGUI"
+
+RDEPEND=">=net-misc/onedrive-2.5
+	dev-python/requests
+	dev-python/pyside6[gui(+),webengine(+),widgets(+)]
+"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+src_prepare() {
+    cp "${FILESDIR}/setup-onedrivegui.py" "${S}/setup.py" || die
+    cp "${FILESDIR}/setup-onedrivegui.cfg" "${S}/setup.cfg" || die
+    cp "${FILESDIR}/OneDriveGUI.desktop" "${S}/src/OneDriveGUI.desktop" || die
+
+    if [[ ${PV} == "9999" ]]; then
+		#fix python package version
+		sed -i "s/version = _VERSION/version = 9999/g" "${S}/setup.cfg" || die
+	else
+		#fix python package version
+		sed -i "s/version = _VERSION/version = ${PV}/g" "${S}/setup.cfg" || die
+	fi
+
+    default
+}
\ No newline at end of file

diff --git a/net-misc/onedrivegui/onedrivegui-1.1.1.ebuild b/net-misc/onedrivegui/onedrivegui-1.1.1.ebuild
deleted file mode 100644
index 5b8f7b0..0000000
--- a/net-misc/onedrivegui/onedrivegui-1.1.1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-M_PN=OneDriveGUI
-
-inherit desktop
-SRC_URI="https://github.com/bpozdena/OneDriveGUI/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
-DESCRIPTION="A simple GUI for OneDrive Linux client, with multi-account support."
-HOMEPAGE="https://github.com/bpozdena/OneDriveGUI"
-
-RDEPEND=">=net-misc/onedrive-2.5.3
-	dev-python/requests
-	dev-python/pyside6[gui(+),webengine(+),widgets(+)]
-"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS=""
-
-S="${WORKDIR}/${M_PN}-${PV}"
-
-src_install() {
-	#Install binary and alias command
-	insinto /opt/OneDriveGUI/ && doins -r "${S}/src/resources" && doins -r "${S}/src/ui" && doins -r "${S}/src/OneDriveGUI.py"
-	insinto /opt/bin/ && doins "${FILESDIR}/OneDriveGUI"
-	fperms +x /opt/OneDriveGUI/OneDriveGUI.py /opt/bin/OneDriveGUI
-
-	#Icon and Desktop File
-	doicon "${S}/src/resources/images/OneDriveGUI.ico"
-	domenu "${FILESDIR}/OneDriveGUI.desktop"
-}

diff --git a/net-misc/onedrivegui/onedrivegui-9999.ebuild b/net-misc/onedrivegui/onedrivegui-9999.ebuild
index 630c789..f73ebad 100644
--- a/net-misc/onedrivegui/onedrivegui-9999.ebuild
+++ b/net-misc/onedrivegui/onedrivegui-9999.ebuild
@@ -1,16 +1,27 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 M_PN=OneDriveGUI
 
-inherit desktop git-r3
-EGIT_REPO_URI="https://github.com/bpozdena/OneDriveGUI.git"
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=(python3_{9..13})
+
+inherit desktop distutils-r1
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/bpozdena/${M_PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/bpozdena/${M_PN}/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
+	KEYWORDS="~amd64"
+    S="${WORKDIR}/${M_PN}-${PV}"
+fi
+
 DESCRIPTION="A simple GUI for OneDrive Linux client, with multi-account support."
 HOMEPAGE="https://github.com/bpozdena/OneDriveGUI"
 
-RDEPEND=">=net-misc/onedrive-2.5.3
+RDEPEND=">=net-misc/onedrive-2.5
 	dev-python/requests
 	dev-python/pyside6[gui(+),webengine(+),widgets(+)]
 "
@@ -18,13 +29,18 @@ RDEPEND=">=net-misc/onedrive-2.5.3
 LICENSE="GPL-3"
 SLOT="0"
 
-src_install() {
-	#Install binary and alias command
-	insinto /opt/OneDriveGUI/ && doins -r "${S}/src/resources" && doins -r "${S}/src/ui" && doins -r "${S}/src/OneDriveGUI.py"
-	insinto /opt/bin/ && doins "${FILESDIR}/OneDriveGUI"
-	fperms +x /opt/OneDriveGUI/OneDriveGUI.py /opt/bin/OneDriveGUI
+src_prepare() {
+    cp "${FILESDIR}/setup-onedrivegui.py" "${S}/setup.py" || die
+    cp "${FILESDIR}/setup-onedrivegui.cfg" "${S}/setup.cfg" || die
+    cp "${FILESDIR}/OneDriveGUI.desktop" "${S}/src/OneDriveGUI.desktop" || die
+
+    if [[ ${PV} == "9999" ]]; then
+		#fix python package version
+		sed -i "s/version = _VERSION/version = 9999/g" "${S}/setup.cfg" || die
+	else
+		#fix python package version
+		sed -i "s/version = _VERSION/version = ${PV}/g" "${S}/setup.cfg" || die
+	fi
 
-	#Icon and Desktop File
-	doicon "${S}/src/resources/images/OneDriveGUI.ico"
-	domenu "${FILESDIR}/OneDriveGUI.desktop"
-}
+    default
+}
\ No newline at end of file


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-26 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-26 23:30 [gentoo-commits] repo/user/dlang:master commit in: net-misc/onedrivegui/files/, net-misc/onedrivegui/ Gonçalo Negrier Duarte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox