You are not logged in.

#1 2011-02-22 20:24:46

MW
Member
Registered: 2007-07-27
Posts: 127

[Request] Bible Analyzer package

I have tried doing the PKGBUILD myself but it came out horrible since I lack the experience to do it properly, could someone review it and change it so that it can be uploaded to AUR?

# Contributor: Timothy Morton <xxxxxxx@bibleanalyzer.com>
# Maintainer: MyWorld <xxxxxxxxx@gmail.com>

pkgname=bibleanalyzer
pkgver=4.1_0
pkgrel=1
pkgdesc="A cross platform Bible study software program."
url="http://www.bibleanalyzer.com"
license="Custom"
arch=('i686' 'x86_64')
depends=('wxpython' 'python-espeak' 'python-configobj')
makedepends=('deb2targz')
source=(http://www.bibleanalyzer.com/${pkgname}_${pkgver//_/-}_i386.deb)
md5sums=('4d3ffb131220cd2db1cf514b9384515b')

build() {
    cd ${srcdir}
    
        # Convert the file
    deb2targz ${pkgname}_${pkgver//_/-}_i386.deb
    
        # Extract the file
    tar xvzf ${pkgname}_${pkgver//_/-}_i386.tar.gz -C /
    
        # Make it python2 compatible on a python3 system
        sed -i 's/python/python2/g' /usr/bin/bibleanalyzer /usr/share/applications/bibleanalyzer.desktop
    
        # Create the directories required
    echo -en '\E[01;31m'"\033[1m   
    For the program to run you need to make sure you have the following directory:
    mkdir /home/[user]/Documents
    \033[0m" 
    echo
    }

The package was originally designed for Ubuntu, hence the last part that the user should make sure he has a "Documents" folder.

On IRC (freenode #archlinux) I have been told:
* There is another way to extract the deb, so deb2targz is not needed?
* I should not extract the package directly to / but to $pkgdir?
* The comment on creating the directory should be appended somewhere else?

Could someone please review this and help me correct my obvious mistakes?
Thanks a million!

Last edited by MW (2011-02-22 20:28:42)

Offline

#2 2011-02-23 01:44:16

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Request] Bible Analyzer package

You should just put the notification in the .install file and let the user worry about it. I can't really remember, but I think ar supports .deb. It would output the control and data tar.gz files though, so you'd need to untar those.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-02-23 02:12:58

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Request] Bible Analyzer package

As I mentioned on IRC, you're not making a package at all here.

tar xvzf ${pkgname}_${pkgver//_/-}_i386.tar.gz -C /

You're trying to extract to /. Stop that. You're also advertising for 64 bit and as far as I can tell its python so there shouldn't be any compiling needed. It should be marked as 'any'.

# Contributor: Timothy Morton <xxxxxxx@bibleanalyzer.com>
# Maintainer: MyWorld <xxxxxxxxx@gmail.com>

pkgname=bibleanalyzer
pkgver=4.1_0
pkgrel=1
pkgdesc="A cross platform Bible study software program."
url="http://www.bibleanalyzer.com"
license="custom"
arch=('any')
depends=('wxpython' 'python-espeak' 'python-configobj')
noextract=("${pkgname}_${pkgver//_/-}_i386.deb")
source=("http://www.bibleanalyzer.com/${pkgname}_${pkgver//_/-}_i386.deb")
md5sums=('4d3ffb131220cd2db1cf514b9384515b')

package() {
   cd "$srcdir"

   bsdtar xf "${pkgname}_${pkgver//_/-}_i386.deb" data.tar.\*
   bsdtar xf data.tar.* -C "$pkgdir"

   # fix for python2 compatability on arch
   sed -i 's/python[^2]/python2/' "$pkgdir/usr/bin/bibleanalyzer" \
                                  "$pkgdir/usr/share/applications/bibleanalyzer.desktop"
}

Offline

#4 2011-02-23 10:54:57

MW
Member
Registered: 2007-07-27
Posts: 127

Re: [Request] Bible Analyzer package

Thank you for the replies so far.

How does it look now?

# Contributor: Timothy Morton <xxxxxxx at bibleanalyzer dot com>
# Maintainer: MyWorld <xxxxxxxxx at gmail dot com>

pkgname=bibleanalyzer
pkgver=4.1_0
pkgrel=1
pkgdesc="A cross platform Bible study software program."
url="http://www.bibleanalyzer.com"
license="custom"
arch=('any')
depends=('wxpython' 'python-espeak' 'python-configobj')
noextract=("${pkgname}_${pkgver//_/-}_i386.deb")
source=("http://www.bibleanalyzer.com/${pkgname}_${pkgver//_/-}_i386.deb"
    "LICENSE")
install=bibleanalyzer.install
md5sums=('4d3ffb131220cd2db1cf514b9384515b'
         '096341a48c2761d5dfd82e5e0401e9a0')

package() {
   cd "$srcdir"

   bsdtar xf "${pkgname}_${pkgver//_/-}_i386.deb" data.tar.\*
   bsdtar xf data.tar.* -C "$pkgdir"

   # fix for python2 compatability on arch
   sed -i 's/python[^2]/python2/' "$pkgdir/usr/bin/bibleanalyzer" \
                                  "$pkgdir/usr/share/applications/bibleanalyzer.desktop"

   install -Dm 644 "$srcdir/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

.install

pkgname=bibleanalyzer

post_install() {
  echo ""
  echo "Please make sure you have the following directory to run the application"
  echo "/home/[username]/Documents"
  echo ""
  }
  
  post_upgrade() {
    post_install $1
    }

Offline

#5 2011-02-26 22:17:48

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [Request] Bible Analyzer package

The launch script and the deaksktop file are both missing a blank after "python2".

You do not need the $pkgname variable in the install scriptlet. The post-upgrade function is weirdly indented.

Offline

Board footer

Powered by FluxBB