Browse Source

[trunk] -> [community] 'gsmartcontrol-1.1.3-3' add

master
Dudemanguy 6 months ago
parent
commit
4fe0ce3c66
Signed by: Dudemanguy GPG Key ID: 4003D2EF625D6492
  1. 51
      gsmartcontrol/trunk/PKGBUILD
  2. 6
      gsmartcontrol/trunk/gsmartcontrol_polkit
  3. 19
      gsmartcontrol/trunk/org.archlinux.pkexec.gsmartcontrol.policy
  4. 51
      gsmartcontrol/x86_64/community/PKGBUILD
  5. 6
      gsmartcontrol/x86_64/community/gsmartcontrol_polkit
  6. 19
      gsmartcontrol/x86_64/community/org.archlinux.pkexec.gsmartcontrol.policy

51
gsmartcontrol/trunk/PKGBUILD

@ -0,0 +1,51 @@
# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
pkgname=gsmartcontrol
pkgver=1.1.3
pkgrel=3
pkgdesc="A graphical user interface for the smartctl hard disk drive health inspection tool."
arch=('x86_64')
url="https://gsmartcontrol.sourceforge.io/home/"
license=('GPL')
depends=('smartmontools' 'gtkmm3' 'xorg-xmessage' 'hicolor-icon-theme')
optdepends=('polkit: to run gsmartcontrol directly from menu'
'xterm: to update the drive database')
source=("https://sourceforge.net/projects/gsmartcontrol/files/${pkgver}/gsmartcontrol-${pkgver}.tar.bz2"
org.archlinux.pkexec.gsmartcontrol.policy
gsmartcontrol_polkit)
md5sums=('6953ed6f90b2551ebdb1ae2470f4acdc'
'503989a7e6a9a287d81e91243d03f162'
'33bdda04d8db1525f2507485f3f2a663')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Modify desktop file
sed -i "s|^Exec=.*|Exec="@prefix@/bin/gsmartcontrol_polkit"|" \
data/gsmartcontrol.desktop.in
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
CXXFLAGS+=' -std=c++11' ./configure --prefix=/usr --sbindir=/usr/bin/
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make check
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR=${pkgdir} install
# Install launcher script
install -m755 ${srcdir}/gsmartcontrol_polkit \
"${pkgdir}/usr/bin/gsmartcontrol_polkit"
# Install policy file
install -Dm644 ${srcdir}/org.archlinux.pkexec.gsmartcontrol.policy \
"${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gsmartcontrol.policy"
}

6
gsmartcontrol/trunk/gsmartcontrol_polkit

@ -0,0 +1,6 @@
#!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/bin/gsmartcontrol" "$@"
else
/usr/bin/gsmartcontrol "$@"
fi

19
gsmartcontrol/trunk/org.archlinux.pkexec.gsmartcontrol.policy

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="org.archlinux.pkexec.gsmartcontrol">
<message>Authentication is required to run the GSmartControl</message>
<icon_name>gsmartcontrol</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

51
gsmartcontrol/x86_64/community/PKGBUILD

@ -0,0 +1,51 @@
# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
pkgname=gsmartcontrol
pkgver=1.1.3
pkgrel=3
pkgdesc="A graphical user interface for the smartctl hard disk drive health inspection tool."
arch=('x86_64')
url="https://gsmartcontrol.sourceforge.io/home/"
license=('GPL')
depends=('smartmontools' 'gtkmm3' 'xorg-xmessage' 'hicolor-icon-theme')
optdepends=('polkit: to run gsmartcontrol directly from menu'
'xterm: to update the drive database')
source=("https://sourceforge.net/projects/gsmartcontrol/files/${pkgver}/gsmartcontrol-${pkgver}.tar.bz2"
org.archlinux.pkexec.gsmartcontrol.policy
gsmartcontrol_polkit)
md5sums=('6953ed6f90b2551ebdb1ae2470f4acdc'
'503989a7e6a9a287d81e91243d03f162'
'33bdda04d8db1525f2507485f3f2a663')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Modify desktop file
sed -i "s|^Exec=.*|Exec="@prefix@/bin/gsmartcontrol_polkit"|" \
data/gsmartcontrol.desktop.in
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
CXXFLAGS+=' -std=c++11' ./configure --prefix=/usr --sbindir=/usr/bin/
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make check
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR=${pkgdir} install
# Install launcher script
install -m755 ${srcdir}/gsmartcontrol_polkit \
"${pkgdir}/usr/bin/gsmartcontrol_polkit"
# Install policy file
install -Dm644 ${srcdir}/org.archlinux.pkexec.gsmartcontrol.policy \
"${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gsmartcontrol.policy"
}

6
gsmartcontrol/x86_64/community/gsmartcontrol_polkit

@ -0,0 +1,6 @@
#!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/bin/gsmartcontrol" "$@"
else
/usr/bin/gsmartcontrol "$@"
fi

19
gsmartcontrol/x86_64/community/org.archlinux.pkexec.gsmartcontrol.policy

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="org.archlinux.pkexec.gsmartcontrol">
<message>Authentication is required to run the GSmartControl</message>
<icon_name>gsmartcontrol</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
Loading…
Cancel
Save