Skip to content
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

app-text/simplenote-desktop-bin: new package, add 2.23.0 #284

Closed
wants to merge 1 commit into from

Conversation

APN-Pucky
Copy link
Contributor

@stkw0
Copy link
Contributor

stkw0 commented Jan 29, 2025

To add the package to the tree, please follow https://wiki.gentoo.org/wiki/Project:GURU/Information_for_Contributors to request commit access to the dev branch. Pull requests for new packages are not (or only exceptionally) merged.

@APN-Pucky
Copy link
Contributor Author

Thanks, I'll do that.

@APN-Pucky APN-Pucky marked this pull request as draft January 30, 2025 12:06
Copy link
Member

@Nowa-Ammerlaan Nowa-Ammerlaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the ebuilds for discord, rocketchat-desktop-bin, whatsapp-desktop-bin and jupyterlab-desktop-bin. You can improve this a lot by using the chromium-2 eclass (mainly for handeling translations). Inside the electron app there is a list of all bundled dependencies and the corresponding licenses, you can use this to populate LICENSE. Note also the specific handeling of the chrome-sandbox binary in those ebuilds. I also recommend using an rpm instead of a deb if possible, you won't need unpacker.eclass then.

I recommend using any of the above mentioned ebuilds as a template instead. Packaging an electron app looks simple at first glance, but it is actually pretty complicated to get right, luckily we already have a bunch of electron apps packaged.

One day we should maybe make an electron-app.eclass.

Comment on lines 4 to 5
EAPI=8
inherit unpacker xdg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EAPI=8
inherit unpacker xdg
EAPI=8
inherit unpacker xdg

Comment on lines 19 to 25

S=${WORKDIR}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
IUSE="doc"
RESTRICT="bindist mirror"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
S=${WORKDIR}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
IUSE="doc"
RESTRICT="bindist mirror"
S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
IUSE="doc"
RESTRICT="bindist mirror"

WORKDIR needs quoting, LICENSE list is probably incomplete since it is an electron app.

Comment on lines 43 to 45
unpack "usr/share/doc/simplenote/changelog.gz" || die "unpack failed"
rm -f "usr/share/doc/simplenote/changelog.gz" || die "rm failed"
mv "changelog" "usr/share/doc/simplenote" || die "mv failed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unpack "usr/share/doc/simplenote/changelog.gz" || die "unpack failed"
rm -f "usr/share/doc/simplenote/changelog.gz" || die "rm failed"
mv "changelog" "usr/share/doc/simplenote" || die "mv failed"
unpack "usr/share/doc/simplenote/changelog.gz"
rm "usr/share/doc/simplenote/changelog.gz" || die
mv "changelog" "usr/share/doc/simplenote" || die

unpack is a built-in function, and thus already calls die.

Comment on lines 54 to 58
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"* || die "dodoc failed"
fi

dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote" || die "dosym failed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"* || die "dodoc failed"
fi
dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote" || die "dosym failed"
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"*
fi
dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote"

same here, these are also built-ins.

Comment on lines 54 to 58
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"* || die "dodoc failed"
fi

dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote" || die "dosym failed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"* || die "dodoc failed"
fi
dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote" || die "dosym failed"
if use doc ; then
dodoc -r "usr/share/doc/simplenote/"*
fi
dosym ../../opt/Simplenote/simplenote "/usr/bin/simplenote"

same here, these are also built-ins.

Comment on lines 27 to 31
RDEPEND="
dev-libs/nss
net-print/cups
x11-libs/libXScrnSaver
"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an electron app, so I am pretty sure there are more dependencies.

@APN-Pucky APN-Pucky force-pushed the mv_simplenote branch 2 times, most recently from 01a1ce6 to 343310b Compare February 23, 2025 15:47
@APN-Pucky
Copy link
Contributor Author

APN-Pucky commented Feb 23, 2025

Take a look at the ebuilds for discord, rocketchat-desktop-bin, whatsapp-desktop-bin and jupyterlab-desktop-bin. You can improve this a lot by using the chromium-2 eclass (mainly for handeling translations). Inside the electron app there is a list of all bundled dependencies and the corresponding licenses, you can use this to populate LICENSE. Note also the specific handeling of the chrome-sandbox binary in those ebuilds. I also recommend using an rpm instead of a deb if possible, you won't need unpacker.eclass then.

I recommend using any of the above mentioned ebuilds as a template instead. Packaging an electron app looks simple at first glance, but it is actually pretty complicated to get right, luckily we already have a bunch of electron apps packaged.

One day we should maybe make an electron-app.eclass.

rpm does not exist for arm64, so I decided to stick with deb for now (if I see it right rpm needs a rpm.eclass).
I used the "ancient shell one-liner" to find the RDEPENDS, but had to filtered other electron apps out that also showed up there.

@APN-Pucky APN-Pucky marked this pull request as ready for review February 23, 2025 15:56
@APN-Pucky APN-Pucky changed the title app-text/simplenote-bin: new package, add 2.22.1 app-text/simplenote-bin: new package, add 2.23.0 Feb 23, 2025
Co-authored-by: Nowa Ammerlaan <[email protected]>
Signed-off-by: Alexander Puck Neuwirth <[email protected]>
@APN-Pucky
Copy link
Contributor Author

Thanks @Nowa-Ammerlaan, given https://bugs.gentoo.org/949072 I assume I should be able to merge it into dev myself now.

@APN-Pucky APN-Pucky changed the title app-text/simplenote-bin: new package, add 2.23.0 app-text/simplenote-desktop-bin: new package, add 2.23.0 Feb 23, 2025
@Nowa-Ammerlaan
Copy link
Member

Thanks @Nowa-Ammerlaan, given https://bugs.gentoo.org/949072 I assume I should be able to merge it into dev myself now.

Yes! There are some instructions on the wiki if it doesn't work right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants