-
Notifications
You must be signed in to change notification settings - Fork 26
net-misc/onedrivegui: fixed #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [Desktop Entry] | ||
| Name=OneDriveGUI | ||
| StartupNotify=true | ||
| Exec=OneDriveGUI | ||
| Terminal=false | ||
| Icon=OneDriveGUI | ||
| Type=Application |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| package_dir = | ||
| OneDriveGUI = src | ||
| install_requires= | ||
| PySide6_Essentials | ||
| requests | ||
|
|
||
| [options.entry_points] | ||
| console_scripts = | ||
| OneDriveGUI = OneDriveGUI:OneDriveGUI.main | ||
|
|
||
| [options.package_data] | ||
| OneDriveGUI = | ||
| resources/default_config | ||
| resources/images/*.png | ||
| resources/images/*.ico | ||
|
|
||
| [options.data_files] | ||
| share/applications/ = | ||
| src/OneDriveGUI.desktop | ||
| share/icons/hicolor/48x48/apps/ = | ||
| src/resources/images/OneDriveGUI.png |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| """Wrapper to allow starting by python -m OneDriveGUI""" | ||
|
|
||
| from .OneDriveGUI import main | ||
|
|
||
| if __name__ == "__main__": | ||
| main() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Copyright 1999-2025 Gentoo Authors | ||
| # Distributed under the terms of the GNU General Public License v2 | ||
|
|
||
| EAPI=8 | ||
|
|
||
| M_PN=OneDriveGUI | ||
|
|
||
| DISTUTILS_SINGLE_IMPL=1 | ||
| 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 | ||
| !net-misc/onedrivegui-bin | ||
| dev-python/requests | ||
| dev-python/pyside[gui(+),webengine(+),widgets(+)] | ||
|
Comment on lines
+27
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're missing |
||
| " | ||
|
|
||
| LICENSE="GPL-3" | ||
| SLOT="0" | ||
|
|
||
| src_prepare() { | ||
| cp "${FILESDIR}/setup-onedrivegui.py" "${S}/setup.py" || die | ||
| cp "${FILESDIR}/setup-onedrivegui-fix1.cfg" "${S}/setup.cfg" || die | ||
| cp "${FILESDIR}/OneDriveGUI-fix1.desktop" "${S}/src/OneDriveGUI.desktop" || die | ||
| cp "${FILESDIR}/wrapper-module.py" "${S}/src/__main__.py" || die | ||
|
|
||
| #fix python package version | ||
| sed -i "s/^version = _VERSION$/version = ${PV}/g" "${S}/setup.cfg" || die | ||
|
|
||
| # Remove unused leftovers | ||
| rm -f "${S}/src/ui/"*_ui.py || die | ||
|
|
||
| # Fix broken image references | ||
| sed -i \ | ||
| -e 's|\.\./\.\./\.\./OneDriveGUI_POC_recovered-multi/|../resources/images/|g' \ | ||
| "${S}/src/ui/"*.py || die | ||
|
|
||
| # Patch file to make it work as a module | ||
| sed -i \ | ||
| -e 's/^from version\b/from .version/' \ | ||
| -e 's/^from ui\./from .ui./' \ | ||
| -e '/^GUI_SETTINGS_FILE =/a\'$'\n''gui_settings = None\nglobal_config = None\ntemp_global_config = None\main_window = None' \ | ||
| -e '/^if __name__ == "__main__":/a\'$'\n'' global gui_settings, global_config, temp_global_config, main_window' \ | ||
| -e 's/if __name__ == "__main__":/def main():/' \ | ||
| -e '$a\'$'\n''\nif __name__ == "__main__":\n main()' \ | ||
| "${S}/src/OneDriveGUI.py" || die | ||
|
Comment on lines
+52
to
+59
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incredibly ugly and unreadable, perhaps a |
||
|
|
||
| python_fix_shebang "${S}/src/OneDriveGUI.py" | ||
|
|
||
| default | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From
pkgcheck --scan:A little bit hard to read through everything though ;)