You are not logged in.

#1 2016-05-22 21:59:47

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

New xombrero-gtk2 PKGBUILD available

Hi! Am about to share a new repo for xombrero-gtk2 that I forked from epitron's. Made a small graph comparing chromium, Firefox, Xombrero and four other browsers performances on a low pro box.
PKGBUILD:

# Contributor: Splex
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Jérémie Astor <astor.jeremie@wanadoo.fr>
# Contributor: Cyrille Laloy <dev at tukoz dot it>

_pkgname=xombrero
pkgname=xombrero-gtk2-git
pkgver=1.6.4.7.g28d1406
pkgrel=1
pkgdesc="Minimalist web browser - gtk2 version"
arch=('i686' 'x86_64')
url="https://github.com/conformal/xombrero/wiki"
license=('custom:ISC')
depends=('webkitgtk2' 'libbsd' 'desktop-file-utils')
makedepends=('git')
install=$pkgname.install
provides=('xombrero')
conflicts=('xxxterm' 'xombrero' 'xombrero3' 'xombrero-git')
source=('git+https://github.com/conformal/xombrero.git'
        'LICENSE')
md5sums=('SKIP'
         'f3eeb6e8b70a3dcccb8ee57daf584c9e')


pkgver() {
	cd $_pkgname
	git describe --always | sed -e 's|-|.|g' -e 's|XOMBRERO_||' -e 's|_|.|g'
}

prepare() {
    cd "$srcdir/$_pkgname"
    sed -i 's|/etc/ssl/cert.pem|/etc/ssl/certs/ca-certificates.crt|' xombrero.conf
    sed -i 's|https://www.cyphertite.com|http://archlinux.org|' xombrero.{c,conf,h}
    sed -i 's|/usr/local|/usr|' xombrero.{h,conf}
    cd "linux"
    sed -i 's|LIBS= gtk+-2.0|& javascriptcoregtk-1.0|' Makefile
    sed -i 's/gnutls/& libbsd/' Makefile
}

build() {
    cd "$srcdir/$_pkgname/"
    make PREFIX="/usr" -C linux GTK_VERSION=gtk2
}
 
package() {
    cd "$srcdir/$_pkgname/"
    make PREFIX="/usr" DESTDIR="$pkgdir" install -C linux GTK-VERSION=gtk2
    install -Dm644 xombrero.conf "$pkgdir/etc/skel/xombrero.conf"
    install -Dm644 xombrero.desktop  "$pkgdir/usr/share/applications/xombrero.desktop"
    install -Dm755 config-checker.pl "$pkgdir/usr/bin/config-checker.pl"
    install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

The .install and .SRCINFO files are there.

Wouldn't mind a review before adding to the AUR.
Especially as it's a child of a github larger repo and I am new to git: Not sure how to avoid getting into a "missing <FILE>"  commit's history schmürtz as it can happen. Thanks.

EDIT: New AUR package is now available also thanks to the help given by early reviewers. Enjoy the ultra speed of a KISS gtk2 browser as you wish (I'll update it)!

Last edited by kozaki (2016-05-25 10:10:47)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#2 2016-05-22 23:24:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: New xombrero-gtk2 PKGBUILD available

The install file can go away completely. Hooks take care of that now.

Everything else looks good, although there are a few nit-picky things you could do.
The main one is consistency; you're using tabs for indentation one one place and spaces in another; you're cd'ing to $_pkgname in one place and $srcdir/$_pkgname in another.
You don't need to run sed multiple times on the same files, you can do it in one statement, just use "-e" to denote each expression or separate them with a semicolon.

Offline

#3 2016-05-23 08:34:12

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: New xombrero-gtk2 PKGBUILD available

Ahow, thank you for taking the time to review Scimmia (errr me and details he he)

How to generate the .SRCINFO without the install file? makepkg --printsrcinfo complained of a missing .install file untill I added it if I remember well.

Please how to avoid mixing my github and aur commit history? As xombrero-gtk2 is a child of PKGBUILD github repo.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#4 2016-05-23 08:49:13

mis
Member
Registered: 2016-03-16
Posts: 234

Re: New xombrero-gtk2 PKGBUILD available

Remove install=$pkgname.install from the PKGBUILD.

I think the easiest way is to start with a new git repo for the AUR package.

Last edited by mis (2016-05-23 08:52:54)

Offline

#5 2016-05-23 13:47:05

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

Re: New xombrero-gtk2 PKGBUILD available

I use a subtree split to turn the history of a single folder into an AUR repo. It's also handy because I can include some setup stuff/githooks in the top of the main repo.

You really should use githooks, they make it impossible to forget to update the .SRCINFO. wink

See: https://github.com/eli-schwartz/pkgbuilds


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

Offline

#6 2016-05-24 14:20:02

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: New xombrero-gtk2 PKGBUILD available

Hi, updated the PKGBUILD thanks to @Scimmia and @mis - thank you guys / lads!
@Eschwartz currently reviewing githooks. Wanna geet if I need to go manual first (you know to get it) before taking the more effective automation road.

Now there's an issue with the *license* part. I'm trying to figure out how epitron gets it installed; my PKGBUILD fails at this point: xombrero source code lacks a LICENSE file AFAIK.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#7 2016-05-24 14:52:36

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

Re: New xombrero-gtk2 PKGBUILD available

The xombrero-git package ships a LICENSE which is uploaded with the PKGBUILd/.SRCINFO/*.install

Since upstream did not see fit to actually include their license (but merely refers to it by name in the README) that is all you can do.


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

Offline

#8 2016-05-24 20:59:59

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: New xombrero-gtk2 PKGBUILD available

@Eschwartz arf thanks, added LICENCE file.
Now trying the githooks way to publish to AUR, auto-keeping a dilligent eye on AUR specific files.

Speaking of eye mine are not that wide open after reading a few docs and feedbacks on working with git subdirectories, submodules, subtree and githooks after a working day (or maybe it's a bit complicated after all wink). Do you see what what I am doing wrong other than forgetting the '-git' on first time?

(/pkgbuilds2)$ git remote add aur git+ssh://aur@aur.archlinux.org/xombrero-gtk2.git

$ git remote add aur git+ssh://aur@aur.archlinux.org/xombrero-gtk2-git.git
fatal: remote aur already exist.

$ git remote set-url aur git+ssh://aur@aur.archlinux.org/xombrero-gtk2-git.git

$ git remote -v
aur     git+ssh://aur@aur.archlinux.org/xombrero-gtk2-git.git (fetch)
aur     git+ssh://aur@aur.archlinux.org/xombrero-gtk2-git.git (push)
origin  https://github.com/tukoz/pkgbuilds-1.git (fetch)
origin  https://github.com/tukoz/pkgbuilds-1.git (push)

$ ./aurpublish -p xombrero-gtk2-git
git fetch aur:xombrero-gtk2-git.git master
fatal: Couldn't find remote ref master

Note that ssh key and config are correctly setup AFAIK.

Last edited by kozaki (2016-05-24 21:09:17)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#9 2016-05-24 21:16:31

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

Re: New xombrero-gtk2 PKGBUILD available

1) `git reset origin/base` -- don't clutter your history with my junk. smile

2) Don't create any kind of remotes (except for your GitHub remote), just make sure your ~/.ssh/config makes an alias for "aur" as the setup script does.

3) You cannot pull xobrero-gtk2-git since the `./aurpublish --pull` command was written in order to fetch an AUR package instead of uploading it, which of course requires that the AUR package exists.
There is no such package yet, so you will have to copy the PKGBUILD + others from wherever you have your previous setup stored, and migrate them into your new pkgbuilds repository which you are modeling after mine... then you can run ./aurpublish

EDIT: 4) the package is xombrero-gtk2-git so why do you sometimes refer to it as xombrero-gtk2? And what do you think would happen if you then decided to publish an actual xobrero-gtk2 package?


The official recommendation is to clone an empty package, commit, then push... but you can push to a nonexistent repo and it will just create the package as needed. So my setup doesn't bother to do anything fancy. And relies on specifying a remote repository url (which git supports) rather than using endless git remotes. wink

...

In short, just keep a GitHub repository with subdirectories containing AUR packages.
./aurpublish handles the work of spinning off a git subtree, then pushing it to a remote repository without messing around with per-package remotes.

I am way too lazy to waste time fighting with remotes and dozens of individual repos. My goal is to handle everything I can via automatic scripts like ./aurpublish

Last edited by eschwartz (2016-05-24 21:31:12)


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

Offline

#10 2016-05-24 22:15:07

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: New xombrero-gtk2 PKGBUILD available

Holy night thanks!

1) -» done.

2) -» I see, mixed the manual and the lazy ways a bit wink (*)
Have kept the Host entry your setup script edited (note I felt a bit nervous having a new script write in my ~/.ssh config).

3) arf, I mixed `aurpublish --speedup` with `aurpublish -p[ull]`:} Now that you say it, it pushes to AUR just fine!

4) Well I'm already in a git/subdirectory (master) typing all sort of git cmds pushing commits to github then to aur/PACKAGE.git, or rather to aur/PACKAGE-git.git. I kinda fear starting to git git speak git strangely to my (non-git) mates' ears.

(*) A few notes on githooks (let me know if there's a more adequate place to post that: maybe your github?)
- The "whitespace issues" message as well as checksum checkup come handy!
- Upon a *commit* how should we read the following?

 *** Generating and adding .SRCINFO for xombrero-gtk2-git ***
==> Création du paquet xombrero-gtk2-git 1.6.4.7.g28d1406-1 (mar. mai 24 23:47:30 CEST 2016)
==> Récupération des sources...    # which sources do we pull here?
  -> Mise à jour du dépot xombrero git   # «-- updating master repo I bet (see prev. message)?
Récupération de origin   # ?

Last edited by kozaki (2016-05-24 22:16:24)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#11 2016-05-25 01:43:49

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

Re: New xombrero-gtk2 PKGBUILD available

The whitespace message is just duplicating the sample hook, for basic cleanliness. It was noted that rejecting a commit outright makes it difficult to add a *.patch to a package, though. sad
It also runs before the .SRCINFO addition, since I have no real complaint against whitespace in auto-generated formulaic files.

Upon a commit, I just made a status message to say that the .SRCINFO is being added.
The other message about pulling sources and comes from makepkg -- verifying source checksums requires you to have the sources downloaded. smile
A bit extraneous for git:// sources, which SKIP their checksums, but hey. smile


....

Feel free to comment or ask questions at my GitHub repo. smile
Suggestions are welcome. I try to make this as useful as possible for the general use case, not just for me.


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

Offline

Board footer

Powered by FluxBB