octopi: submit split PKGBUILD

This commit is contained in:
Bruce Liu 2014-06-12 04:33:38 +00:00
parent c55eb49a90
commit 8262a71087

147
octopi/PKGBUILD-s Normal file
View File

@ -0,0 +1,147 @@
# Contributor: AlmAck <almack@chakraos.org>
# Maintainer: Bruce Liu <brli@users.sourceforge.net>
pkgbase=octopi
pkgname=('octopi' 'octopi-notifier' 'octopi-qt5' 'octopi-notifier-qt5')
pkgver=0.4.0
pkgrel=4
url="https://octopiproject.wordpress.com/"
arch=('x86_64')
license=('GPL3')
depends=('pacman' 'pacmanlogviewer' 'mirror-check')
makedepends=('automoc4' 'qt' 'qt5-declarative')
conflicts=('oktopi')
replaces=('oktopi')
categories=('system')
screenshot=('http://octopiproject.files.wordpress.com/2014/01/octopi_in_kaos.png')
gitsha=cebe039944
source=("$pkgname"::"git://github.com/aarnt/${pkgname}.git#commit=${gitsha}")
md5sums=('SKIP')
prepare(){
cd "${srcdir}/${pkgbase}"
# patch .desktop files
sed -i 's/Categories=GNOME;GTK;System;/Categories=System;Tools;/g' octopi.desktop octopi-notifier.desktop
sed -i 's/\/\/#define NO_GTK_STYLE/#define NO_GTK_STYLE/g' src/main.cpp notifier/octopi-notifier/main.cpp
sed -i 's/Icon=octopi/Icon=octopi-notifier/g' octopi-notifier.desktop
# prepare for package split
cp -r "${srcdir}/${pkgbase}" "${srcdir}/${pkgbase}-qt5"
}
build() {
# first we build Qt4 version
cd "${srcdir}/${pkgbase}"
qmake octopi.pro
make
pushd "notifier/pacmanhelper"
qmake pacmanhelper.pro
make
popd
pushd "notifier/octopi-notifier"
qmake octopi-notifier.pro
make
popd
pushd "repoeditor"
qmake repoeditor.pro
make
popd
# next, the qt5 flavor
cd "${srcdir}/${pkgbase}"
qmake-qt5 octopi.pro
make
pushd "notifier/pacmanhelper"
qmake-qt5 pacmanhelper.pro
make
popd
pushd "notifier/octopi-notifier"
qmake-qt5 octopi-notifier.pro
make
popd
pushd "repoeditor"
qmake-qt5 repoeditor.pro
make
popd
}
package_octopi() {
pkgdesc="Octopi, a powerful Pacman frontend using Qt libs"
depends+=('qt')
provides+=('octopi')
conflicts+=('octopi')
# start package
cd ${srcdir}/${pkgbase}
install -Dm 755 bin/octopi ${pkgdir}/usr/bin/octopi
install -Dm 755 repoeditor/bin/octopi-repoeditor ${pkgdir}/usr/bin/octopi-repoeditor
install -Dm 644 octopi.desktop ${pkgdir}/usr/share/applications/octopi.desktop
install -Dm 644 resources/images/octopi_green.png ${pkgdir}/usr/share/icons/octopi.png
}
package_octopi-notifier() {
pkgdesc="Octopi system tray notification"
depends+=('qt')
conflicts+=('octopi-notifier')
# main application
cd "${srcdir}/${pkgbase}"
install -Dm755 notifier/bin/octopi-notifier ${pkgdir}/usr/bin/${pkgname}
install -Dm644 octopi-notifier.desktop ${pkgdir}/usr/share/applications/octopi-notifier.desktop
install -Dm644 resources/images/octopi_red.png ${pkgdir}/usr/share/icons/${pkgname}.png
#Pacmanhelper service files
install -Dm755 notifier/bin/pacmanhelper ${pkgdir}/usr/lib/octopi/pacmanhelper
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}/usr/share/polkit-1/actions/org.octopi.pacman.policy
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}/usr/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}/usr/share/dbus-1/system-services/org.octopi.pacmanhelper.service
}
package_octopi-qt5() {
pkgdesc="Octopi, a powerful Pacman frontend using Qt libs - Qt5 version"
depends+=('qt5-declarative')
provides+=('octopi')
conflicts+=('octopi')
# start package
cd ${srcdir}/${pkgbase}
install -Dm 755 bin/octopi ${pkgdir}/usr/bin/octopi
install -Dm 755 repoeditor/bin/octopi-repoeditor ${pkgdir}/usr/bin/octopi-repoeditor
install -Dm 644 octopi.desktop ${pkgdir}/usr/share/applications/octopi.desktop
install -Dm 644 resources/images/octopi_green.png ${pkgdir}/usr/share/icons/octopi.png
}
package_octopi-notifier-qt5() {
pkgdesc="Octopi system tray notification - Qt5 version"
depends+=('qt5-declarative')
provides+=('octopi-notifier')
conflicts+=('octopi-notifier')
# main application
cd "${srcdir}/${pkgbase}"
install -Dm755 notifier/bin/octopi-notifier ${pkgdir}/usr/bin/${pkgname}
install -Dm644 octopi-notifier.desktop ${pkgdir}/usr/share/applications/octopi-notifier.desktop
install -Dm644 resources/images/octopi_red.png ${pkgdir}/usr/share/icons/${pkgname}.png
#Pacmanhelper service files
install -Dm755 notifier/bin/pacmanhelper ${pkgdir}/usr/lib/octopi/pacmanhelper
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}/usr/share/polkit-1/actions/org.octopi.pacman.policy
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}/usr/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}/usr/share/dbus-1/system-services/org.octopi.pacmanhelper.service
}