archrelease: copy trunk to community-any
[ArchLinux/community.git] / gsmartcontrol / trunk / PKGBUILD
blob7a49fe684e4fd12e3bbb34aec2e6daf1d72807f6
1 # Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
4 pkgname=gsmartcontrol
5 pkgver=1.1.4
6 pkgrel=1
7 pkgdesc="A graphical user interface for the smartctl hard disk drive health inspection tool."
8 arch=('x86_64')
9 url="https://gsmartcontrol.sourceforge.io/home/"
10 license=('GPL')
11 depends=('smartmontools' 'gtkmm3' 'xorg-xmessage' 'hicolor-icon-theme')
12 optdepends=('polkit: to run gsmartcontrol directly from menu'
13             'xterm: to update the drive database')
14 source=("https://github.com/ashaduri/gsmartcontrol/releases/download/v${pkgver}/gsmartcontrol-${pkgver}.tar.bz2"
15         org.archlinux.pkexec.gsmartcontrol.policy
16         gsmartcontrol_polkit)
17 sha256sums=('fc409f2b8a84cc40bb103d6c82401b9d4c0182d5a3b223c93959c7ad66191847'
18             '98ae73cbe39be31f885d8c4d09cbfac7b454534ea1ba7cb5a8d23365dc22212a'
19             '66f952196db24d6e3ee454b03481d52e0281c3bbf8be180600bf5ba7b39ec0ea')
21 prepare() {
22         cd ${pkgname}-${pkgver}
24         # Modify desktop file
25         sed -i "s|^Exec=.*|Exec="@prefix@/bin/gsmartcontrol_polkit"|" \
26                 data/gsmartcontrol.desktop.in
29 build() {
30         cd ${pkgname}-${pkgver}
31         CXXFLAGS+=' -std=c++11' ./configure --prefix=/usr --sbindir=/usr/bin/
32         make
35 check() {
36         cd ${pkgname}-${pkgver}
37         make check
40 package() {
41         cd ${pkgname}-${pkgver}
43         make DESTDIR="${pkgdir}" install
45         # Install launcher script
46         install -m755 "${srcdir}"/gsmartcontrol_polkit \
47                 "${pkgdir}/usr/bin/gsmartcontrol_polkit"
49         # Install policy file
50         install -Dm644 "${srcdir}"/org.archlinux.pkexec.gsmartcontrol.policy \
51                 "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gsmartcontrol.policy"