You are not logged in.

#1 2020-03-24 15:50:17

mohan226
Member
Registered: 2020-03-24
Posts: 7

PKGBUILD review request: bixby-studio

I saw that there is no AUR package for bixby-studio so I created one. This is my first time creating a PKGBUILD and I want to submit it to the AUR after correcting everything.
I'm not sure if I should put all of those dependancies. I just took them from the deb file. Thanks in advance.
Also, I created the PKGBUILD using debtap and I went through the PKGBUILD wiki page and edited it.

# Maintainer: Harshith Mohan <gharshitmohan@ymail.com>
pkgname=bixby-studio
pkgver=7.13.0_r20d.15375
pkgrel=1
pkgdesc="Bixby Developer Studio"
arch=('x86_64')
url="https://bixbydevelopers.com/"
license=('commercial')
depends=('at-spi2-core' 'gtk3' 'libappindicator-gtk3' 'libnotify' 'libsecret' 'libutil-linux' 'libxss' 'libxtst' 'nss' 'xdg-utils')
options=('!strip' '!emptydirs')
install=${pkgname}.install
source_x86_64=("https://bixby-ide.s3.amazonaws.com/stable-c4f5c975-1d91-4065-b661-633de7275e11/BixbyStudio-${pkgver//_/-}-linux.deb")
md5sums_x86_64=('e5ac608571d13473e6d046e6f1ae4ad0')

package(){
        tar xf data.tar.xz -C "${pkgdir}"
        install -D -m644 "${pkgdir}/opt/Bixby Studio/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

And here is the bixby-studio.install file

post_install() {
        gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
        ln -sf '/opt/Bixby Studio/bixbystudio' '/usr/bin/bixby-studio'
        update-mime-database /usr/share/mime || true
        update-desktop-database /usr/share/applications || true
        update-desktop-database -q
}

post_upgrade() {
        post_install
}

post_remove() {
        gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
        rm -f '/usr/bin/bixby-studio'
        update-desktop-database -q
}

Last edited by mohan226 (2020-03-24 15:52:06)

Offline

#2 2020-03-24 16:13:55

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: bixby-studio

You should create the symlink /usr/bin/bixby-studio in the package() function, do not create untracked files.

Remove all the other parts of the install script too, since these are now taken care of by `man 5 alpm-hooks` in /usr/share/libalpm/hooks/:

gtk-update-icon-cache.hook
update-desktop-database.hook
update-mime-database.hook

Last edited by eschwartz (2020-03-24 16:14:19)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2020-03-24 16:20:38

mohan226
Member
Registered: 2020-03-24
Posts: 7

Re: PKGBUILD review request: bixby-studio

eschwartz wrote:

You should create the symlink /usr/bin/bixby-studio in the package() function, do not create untracked files.

Remove all the other parts of the install script too, since these are now taken care of by `man 5 alpm-hooks` in /usr/share/libalpm/hooks/:

gtk-update-icon-cache.hook
update-desktop-database.hook
update-mime-database.hook

Thank you!
So, this should suffice?

                                                                             
# Maintainer: Harshith Mohan <gharshitmohan@ymail.com>
pkgname=bixby-studio
pkgver=7.13.0_r20d.15375
pkgrel=1
pkgdesc="Bixby Developer Studio"
arch=('x86_64')
url="https://bixbydevelopers.com/"
license=('commercial')
depends=('at-spi2-core' 'gtk3' 'libappindicator-gtk3' 'libnotify' 'libsecret' 'libutil-linux' 'libxss' 'libxtst' 'nss' 'xdg-utils')
options=('!strip' '!emptydirs')
source_x86_64=("https://bixby-ide.s3.amazonaws.com/stable-c4f5c975-1d91-4065-b661-633de7275e11/BixbyStudio-${pkgver//_/-}-linux.deb")
md5sums_x86_64=('e5ac608571d13473e6d046e6f1ae4ad0')

package(){
        tar xf data.tar.xz -C "${pkgdir}"
        install -D -m644 "${pkgdir}/opt/Bixby Studio/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
        ln -sf '/opt/Bixby Studio/bixbystudio' '/usr/bin/bixby-studio'
}

Last edited by mohan226 (2020-03-24 16:20:55)

Offline

#4 2020-03-24 16:25:59

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: bixby-studio

Well, if you try it you will see it doesn't work. tongue

You need to install the symlink within the "${pkgdir}" virtualized hierarchy, not directly to /usr/bin

As for the rest, it seems fine I suppose. I doubt you need to depend on libutil-linux, though, since it is already part of the base install (util-linux is a direct dependency of the "base" metapackage).


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2020-03-24 17:11:04

mohan226
Member
Registered: 2020-03-24
Posts: 7

Re: PKGBUILD review request: bixby-studio

eschwartz wrote:

Well, if you try it you will see it doesn't work. tongue

You need to install the symlink within the "${pkgdir}" virtualized hierarchy, not directly to /usr/bin

As for the rest, it seems fine I suppose. I doubt you need to depend on libutil-linux, though, since it is already part of the base install (util-linux is a direct dependency of the "base" metapackage).

So sorry. That's my fault. I should've checked first. I feel stupid now.
Anyway, is this fine? This time I actually tried installing it tongue

# Maintainer: Harshith Mohan <gharshitmohan@ymail.com>
pkgname=bixby-studio
pkgver=7.13.0_r20d.15375
pkgrel=1
pkgdesc="Bixby Developer Studio"
arch=('x86_64')
url="https://bixbydevelopers.com/"
license=('commercial')
depends=('at-spi2-core' 'gtk3' 'libappindicator-gtk3' 'libnotify' 'libsecret' 'libxss' 'libxtst' 'nss' 'xdg-utils')
options=('!strip' '!emptydirs')
source_x86_64=("https://bixby-ide.s3.amazonaws.com/stable-c4f5c975-1d91-4065-b661-633de7275e11/BixbyStudio-${pkgver//_/-}-linux.deb")
md5sums_x86_64=('e5ac608571d13473e6d046e6f1ae4ad0')

package(){
        tar xf data.tar.xz -C "${pkgdir}"
        install -dm755 $pkgdir/usr/bin
        ln -sf "/opt/Bixby Studio/bixbystudio" "$pkgdir/usr/bin/bixby-studio"
        install -D -m644 "${pkgdir}/opt/Bixby Studio/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

Last edited by mohan226 (2020-03-24 17:11:38)

Offline

#6 2020-03-24 17:16:42

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: bixby-studio

        install -dm755 $pkgdir/usr/bin
        ln -sf "/opt/Bixby Studio/bixbystudio" "$pkgdir/usr/bin/bixby-studio"

That should work, but...

- The first line needs to quote the variable.
- Style nit: I would use ${pkgdir} instead of $pkgdir, for consistency with the other places you've used it.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2020-03-24 17:34:08

mohan226
Member
Registered: 2020-03-24
Posts: 7

Re: PKGBUILD review request: bixby-studio

        install -dm755 "${pkgdir}/usr/bin"
        ln -sf "/opt/Bixby Studio/bixbystudio" "${pkgdir}/usr/bin/bixby-studio"

Something like this?

Offline

#8 2020-03-24 18:10:54

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: bixby-studio

Exactly, yes. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2020-03-24 18:15:36

mohan226
Member
Registered: 2020-03-24
Posts: 7

Re: PKGBUILD review request: bixby-studio

eschwartz wrote:

Exactly, yes. smile

Thank you for all your help smile

Offline

Board footer

Powered by FluxBB