1 # Contributor : 3ED <krzysztof1987@gmail.com>
2 # based pkgbuild fancris3 and nemOn(YarLUG)
4 pkgname=linuxdcpp-bzr-i18n
6 # tested at 287; if now not work, use --holdver
8 pkgdesc="Linux dc++ 1.0.2+core0707+i18n (multilanguages)"
9 url="https://launchpad.net/linuxdcpp"
11 arch=('i686' 'x86_64')
12 depends=('libglade' 'bzip2' 'gettext')
13 makedepends=('scons' 'bzr' 'gcc' 'pkgconfig' 'boost')
14 conflicts=('linuxdcpp' 'linuxdcpp-cvs' 'linuxdcpp-bzr')
16 _bzrtrunk=https://code.launchpad.net/~individ/linuxdcpp/i18n
22 msg "Connecting to linuxdcpp bzr server...."
24 if [ -d "$srcdir/$_bzrmod" ] ; then
25 cd "$_bzrmod" && bzr up
26 msg "The local files are updated."
31 msg "bzr checkout done or server timeout"
32 msg "Starting make..."
34 rm -r "$srcdir/$_bzrmod-build"
35 cp -r "$srcdir/$_bzrmod" "$startdir/src/$_bzrmod-build"
36 cd "$srcdir/$_bzrmod-build/"
37 tar -xf "$srcdir/dcpp-win32-po.tar.gz"
40 cd "$srcdir/$_bzrmod-build/dcpp/po/"
41 cp "$srcdir/i18n.better.sh" "$srcdir/$_bzrmod-build/i18n.better.sh"
42 cp "$srcdir/libdcpp.pl.po" "$srcdir/$_bzrmod-build/dcpp/po/pl.po"
43 mkdir "$srcdir/$_bzrmod-build/linux/po"
45 if [ "$i" = '*.po' ]; then break; fi
46 sh "$srcdir/$_bzrmod-build/i18n.better.sh" "${i%%.po}" "win32/po/$i"
49 # better linuxdcpp.pl.po
50 msgmerge "$srcdir/linuxdcpp.pl.po" "$srcdir/$_bzrmod-build/linux/po/linuxdcpp.pot" > "$srcdir/$_bzrmod-build/pl.po"
51 msgfmt -c "$srcdir/$_bzrmod-build/pl.po" -o "$srcdir/$_bzrmod-build/locale/pl/LC_MESSAGES/linuxdcpp.mo"
53 # compile and install program
54 cd "$srcdir/$_bzrmod-build"
55 scons PREFIX=/usr LIBDIR=/usr/share || return 1
56 scons install FAKE_ROOT="$pkgdir" || return 1
58 # install desktop and pixmap
59 install -D "$srcdir/linuxdcpp.desktop" "$pkgdir/usr/share/applications/linuxdcpp.desktop"
60 install -D "$srcdir/$_bzrmod-build/pixmaps/linuxdcpp.png" "$pkgdir/usr/share/pixmaps/linuxdcpp.png"
63 cp -r "$srcdir/$_bzrmod-build/locale" "$pkgdir/usr/share/"
66 rm -r "$startdir/src/$_bzrmod-build"