You are not logged in.

#1 2015-08-14 10:47:48

benneti
Member
Registered: 2014-05-04
Posts: 24

[SOLVED] PKBUILD for ice-ssb for review

This is my first PKGBUILD, so I think a review would be nice.
It is Inspired by the PKGBUILD of Apricity OS, should this be in my PKGBUILD?
If yes, where and how should I mention it?
https://github.com/agajews/ApricityOS/t … er/ice-ssb

PKGBUILD

#Maintainer: Benedikt Tissot <benedikt.tissot@googlemail.com>

_pkgname=ice
pkgname=ice-ssb
pkgver=5.0.1
pkgrel=1
pkgdesc='a simple Site Specific Browser for Chromium and Google Chrome from "Peppermint OS" Project'
arch=(any)
license=(GPL2)
depends=("python-requests" "python-beautifulsoup4" "python2" "pygtk" "python2-gobject")
source=("$_pkgname-$pkgver.tar.gz::https://launchpad.net/~peppermintos/+archive/ubuntu/p6-release/+files/ice_5.0.1.tar.gz")
optdepends=("chromium: Browser to use" "google-chrome: Browser to use")
sha256sums=(SKIP)
install=ice-ssb.install

package() {
	cp -r -f "${srcdir}/$_pkgname-$pkgver/usr" "${pkgdir}/usr"
}

ice-ssb.install

# links to use google chrome from AUR and chromium from official reps
post_install(){
sudo ln -s /usr/bin/chromium /usr/bin/chromium-browser
sudo ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome
}

post_upgrade(){
sudo ln -s /usr/bin/chromium /usr/bin/chromium-browser
sudo ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome
}

post_remove(){
rm /usr/bin/ice
rm /usr/share/pixmaps/ice.png
rm /usr/share/applications/ice.desktop
}

Thank you for your input smile

PS: I am new to git and the process of uploading to the AUR, so wich SSH keys I need exactly and wich should I create.
I think I did not get it completly in the Wiki.

Last edited by benneti (2015-08-25 13:32:28)

Offline

#2 2015-08-14 12:45:32

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [SOLVED] PKBUILD for ice-ssb for review

First of all, skipping the checksums is a Bad Thing™ (except for sources hosted on a VCS platform): if you do this, you'll never know if the sources have been altered/are corrupted.

Secondly, creating/deleting files in the install script is a bad practice that leaves untracked files and soon or later will lead to a breakage. Using sudo is also redundant because the install script is already executed using elevated privileges. If you really need those symlinks (are they actually needed by ice?) then you should create them in the package function:

package() {
	cp -r -f "${srcdir}/$_pkgname-$pkgver/usr" "${pkgdir}/usr"
        ln -s /usr/bin/chromium "${pkgdir}/usr/bin/chromium-browser"
        ln -s /usr/bin/google-chrome-stable "${pkgdir}/usr/bin/google-chrome"
}

Lastly,  you should add python-gobject to the depends array. actually, since ice is a python3 script, it should depends on python and python-gobject instead of  python2 and  python2-gobject.

--edit:

benneti wrote:

It is Inspired by the PKGBUILD of Apricity OS, should this be in my PKGBUILD?

INAL, but you could just add a commente mentioning it as a contributor.

Last edited by mauritiusdadd (2015-08-14 13:15:08)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-08-14 13:02:11

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] PKBUILD for ice-ssb for review

It is Inspired by the PKGBUILD of Apricity OS, should this be in my PKGBUILD?
If yes, where and how should I mention it?

Common practice is to list the names of people that worked on other versions of that pkgbuild as contributors.

#Maintainer: Alex Gajewski <apagajewski@gmail.com>

copy that line from the apricot PKGBUILD, replace Maintainer with Contributor .
If you WANT to, you can add some comments about why they are on the list of contributors.

--------------------------
Add an url field, it should point to upstream .
Looking inside the launchpad binary file, the code was written by Kendall Weaver who appears to be connected to Peppermint OS .
Their email address is in the readme file, asking them if there is a an upstream webpage for ice seems seasiest.

-----------------------------
I think it would be cleaner to create the symlinks in the PKGBUILD, mesa-libgl PKGBUILD shows how that can be done.

----------------------------

sha256sums=(SKIP)

Don't skip checksummming without a very good reason.

Last edited by Lone_Wolf (2015-08-14 13:02:44)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2015-08-15 21:05:30

benneti
Member
Registered: 2014-05-04
Posts: 24

Re: [SOLVED] PKBUILD for ice-ssb for review

Thank you for your input, the PKGBUILD now looks like this:

#Maintainer: Benedikt Tissot <benedikt.tissot@googlemail.com>
#Contributor: Alex Gajewski <apagajewski@gmail.com>

_pkgname=ice
pkgname=ice-ssb
pkgver=5.0.1
pkgrel=1
pkgdesc='a simple Site Specific Browser for Chromium and Google Chrome from "Peppermint OS" Project'
arch=(any)
license=(GPL2)
depends=("python-requests" "python-beautifulsoup4" "python" "pygtk" "python-gobject")
source=("$_pkgname-$pkgver.tar.gz::https://launchpad.net/~peppermintos/+archive/ubuntu/p6-release/+files/ice_5.0.1.tar.gz")
optdepends=("chromium: Browser to use" "google-chrome: Browser to use")
sha256sums=(SKIP)
install=ice-ssb.install

package() {
	cp -r -f "${srcdir}/$_pkgname-$pkgver/usr" "${pkgdir}/usr"
	# symlinks to use chromium and google-chrome
	ln -s /usr/bin/chromium "${pkgdir}/usr/bin/chromium-browser"
        ln -s /usr/bin/google-chrome-stable "${pkgdir}/usr/bin/google-chrome"
}

Do I still need the install file now?
And for the ckecksum should I create them by my own, since there are no on the launchpad page?

To your question: yes ICE needs  the symlinks, because it creates .desktop files and uses the linked files as executables. I think the symlinks are the easyest way because it should work with all versions of chromium or chrome - you would just need to change the symlinks.

Lastly I wrote Kendall, but i do not think there is an upstream url, so is it ok if this is not defined?

Offline

#5 2015-08-16 07:23:37

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [SOLVED] PKBUILD for ice-ssb for review

benneti wrote:

Do I still need the install file now?

Since the only purpose of the install file was to create the simlinks, now it is completely unuseful ans should be removed.

benneti wrote:

And for the ckecksum should I create them by my own, since there are no on the launchpad page?

It's your responsibility to generate the new checksums every time the sources are updated: see https://wiki.archlinux.org/index.php/Ma … _checksums

benneti wrote:

Lastly I wrote Kendall, but i do not think there is an upstream url, so is it ok if this is not defined?

I don't know, but maybe you can use the launchpad url as upstream url.

PS: also pygtk is not needed because it's a python2 module and it has been fully replaced by python-gobject.


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#6 2015-08-16 09:54:01

benneti
Member
Registered: 2014-05-04
Posts: 24

Re: [SOLVED] PKBUILD for ice-ssb for review

thank you again for your answers and all of your input,
the pkgbuild is now available in the aur and looks like this:

#Maintainer: Benedikt Tissot <benedikt.tissot@googlemail.com>
#Contributor: Alex Gajewski <apagajewski@gmail.com>

_pkgname=ice
pkgname=ice-ssb
pkgver=5.0.1
pkgrel=1
pkgdesc='a simple Site Specific Browser for Chromium and Google Chrome from "Peppermint OS" Project'
url='http://peppermintos.com/guide/ice/'
arch=(any)
license=(GPL2)
depends=("python-requests" "python-beautifulsoup4" "python" "python-gobject")
source=("$_pkgname-$pkgver.tar.gz::https://launchpad.net/~peppermintos/+archive/ubuntu/p6-release/+files/ice_5.0.1.tar.gz")
optdepends=("chromium: Browser to use" "google-chrome: Browser to use")
sha256sums=('51e611d38950a216a45bf426b808f6e90b375304106036dd68a9ec246522705c')

package() {
	cp -r -f "${srcdir}/$_pkgname-$pkgver/usr" "${pkgdir}/usr"
	# symlinks to use chromium and google-chrome, change if you use other versions
	ln -s /usr/bin/chromium "${pkgdir}/usr/bin/chromium-browser"
        ln -s /usr/bin/google-chrome-stable "${pkgdir}/usr/bin/google-chrome"
}

Offline

#7 2015-08-16 10:22:17

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] PKBUILD for ice-ssb for review

One thing i forgot to post :

The file downloaded from launchpad doesn't include sourcecode, but binaries .
To reflect this, the package name should end with -bin  , so ice-ssb-bin would be more appropriate.

Edit : Progandy is right and package name is fine.
i should have looked better at the downloaded files.

Last edited by Lone_Wolf (2015-08-17 09:07:46)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2015-08-16 13:43:20

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] PKBUILD for ice-ssb for review

Lone_Wolf wrote:

One thing i forgot to post :

The file downloaded from launchpad doesn't include sourcecode, but binaries .
To reflect this, the package name should end with -bin  , so ice-ssb-bin would be more appropriate.

Why? /usr/bin/ice is a python script and therefore it is sourcecode.

Last edited by progandy (2015-08-16 13:44:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

Board footer

Powered by FluxBB