You are not logged in.

#1 2008-06-17 20:02:56

sp42b
Member
Registered: 2008-04-01
Posts: 13

[SOLVED] New PKGBUILD for dvbcut. Please review.

Bad English, sorry!

I am a heavy user of dvbcut. It is really nice program to cut commercials out of dvb recordings.
http://dvbcut.sourceforge.net/

The problem was, i could not build dvbcut 0.5.4 on arch. Probably because of new compiler versions and scons problems. So i used an old binary in my home directory.

The good news is, they changed the build system a few days ago:
http://www.mail-archive.com/dvbcut-user … 01006.html

Now i can build dvbcut and i adopted the packages on AUR.
http://aur.archlinux.org/packages.php?ID=2793
Before i update AUR, i want to make sure, that everything is ok. Is the svn solution appropriate?


PKGBUILD

# Contributor: AndyRTR <andreas.radke@freenet.de>

pkgname=dvbcut
pkgver=0.5.4
pkgrel=2
pkgdesc="Qt application for cutting parts out of DVB streams"
arch=('i686' 'x86_64')
url="http://dvbcut.sourceforge.net/index.html"
license="GPL"
depends=('qt3' 'libao')
makedepends=('autoconf' 'make' 'subversion')
install=dvbcut.install
source=(dvbcut.desktop)
md5sums=('e41118aef010f3a19140f9fc2463d4ce')


build() {
  cd ${srcdir}

  # 0.5.4 does not build anymore. Using svn until next release.
  msg "Connecting to SVN server...."
  if [ -d dvbcut/.svn ]; then
    (cd dvbcut && svn up -r 129)
  else
    svn co -r 129 --config-dir ./ https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk dvbcut
  fi
  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  cp -r dvbcut dvbcut-build
  cd dvbcut-build

  autoconf || return 1
  ./configure --prefix=/usr --with-qt3=/opt/qt
  make || return 1

  install -Dm755 ${srcdir}/${pkgname}-build/bin/dvbcut ${pkgdir}/usr/bin/dvbcut  
  install -Dm644 ${srcdir}/${pkgname}-build/dvbcut.1 ${pkgdir}/usr/share/man/man1/dvbcut.1
  install -Dm644 ${startdir}/dvbcut.desktop ${pkgdir}/usr/share/applications/dvbcut.desktop

  rm -rf ${srcdir}/dvbcut-build
}

dvbcut.install

post_install() {
cat << 'EOF'
==> If you have "mplayer" installed on your machine, 
==> you can play videos inside of DVBCUT.
EOF
}

op=$1
shift
$op $*

dvbcut.desktop

[Desktop Entry]
Categories=Qt;Video;AudioVideo;AudioVideoEditing;
Encoding=UTF-8
Name=dvbcut
GenericName=DVBCut
Type=Application
Exec=/usr/bin/dvbcut
Icon=

Last edited by sp42b (2008-06-18 20:45:13)

Offline

#2 2008-06-17 21:34:28

xaw
Member
From: Chapel Hill
Registered: 2007-08-09
Posts: 177

Re: [SOLVED] New PKGBUILD for dvbcut. Please review.

Instead of using custom svn commands in the build() function, it would be wise to use something along these lines:

_svntrunk=https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk
_svnmod=dvbcut
_revnumber=$pkgver

before the build() function in the PKGBUILD.
This functionality is built into makepkg/ABS already, so there is no need to reinvent it ;-).

Last edited by xaw (2008-06-17 21:36:24)


The water never asked for a channel, and the channel never asked for water.

Offline

#3 2008-06-18 00:42:03

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [SOLVED] New PKGBUILD for dvbcut. Please review.

you should also look at /usr/share/pacman/PKGBUILD-svn.proto, it may help.

op=$1
shift
$op $*

This is no longer needed, remove it.

'make' as makedepends is also not needed.

Apart from all that, your PKGBUILD looks great.

Last edited by Daenyth (2008-06-18 00:43:23)

Offline

#4 2008-06-18 12:49:11

sp42b
Member
Registered: 2008-04-01
Posts: 13

Re: [SOLVED] New PKGBUILD for dvbcut. Please review.

Thanks for the replies.

- removed make in makedepends array
- removed last three lines in .install

If i change the svn part, makepkg will automatically fetch the latest revision when building the packages, or?
I have mixed feelings about this, because i only wanted to use svn as a workaround for the build problems with the stable(!) version. I will make a second version and decide this evening which one i upload.

Further comments welcome.

Offline

#5 2008-06-18 17:18:27

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [SOLVED] New PKGBUILD for dvbcut. Please review.

If you have reservations about the svn thing then why don't you make this package 'dvbcut-svn', just add

provides=('dvbcut')
conflicts=('dvbcut')

The, when the stable version is released you can make a 'proper' package.

Offline

#6 2008-06-18 20:44:08

sp42b
Member
Registered: 2008-04-01
Posts: 13

Re: [SOLVED] New PKGBUILD for dvbcut. Please review.

Thanks everybody.
I updated the package on AUR. I did not changed the svn part. I probable will do it in the next version.

Offline

Board footer

Powered by FluxBB