summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Santos2015-07-14 22:13:07 +0100
committerMauro Santos2015-07-14 22:13:07 +0100
commit6c86ffb8b727143fa649afd8b47b14bfe6740070 (patch)
tree81d34e3976c56653b15f7078400279999925e4b5
downloadaur-6c86ffb8b727143fa649afd8b47b14bfe6740070.tar.gz
Initial import
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD26
-rw-r--r--systemd-hddapm.install20
4 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c3706c56e66
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = systemd-hddapm
+ pkgdesc = Hard Disk APM level service for systemd
+ pkgver = 1.6
+ pkgrel = 1
+ url = https://sourceforge.net/projects/hddapm
+ install = systemd-hddapm.install
+ arch = any
+ license = GPL
+ depends = hdparm
+ depends = systemd
+ backup = etc/udev/rules.d/10-hddapm.rules
+ source = https://downloads.sourceforge.net/project/hddapm/hddapm-1.6.tar.gz
+ md5sums = 0e07111f65cd7768f992ff52cdd73a88
+
+pkgname = systemd-hddapm
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..027271b9b22
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+files
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9051aa6984d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Mauro Santos <registo.mailling@gmail.com>
+
+pkgname=systemd-hddapm
+pkgver=1.6
+pkgrel=1
+pkgdesc="Hard Disk APM level service for systemd"
+arch=('any')
+url="https://sourceforge.net/projects/hddapm"
+license=('GPL')
+depends=('hdparm' 'systemd')
+backup=('etc/udev/rules.d/10-hddapm.rules')
+install=$pkgname.install
+source=("https://downloads.sourceforge.net/project/hddapm/hddapm-${pkgver}.tar.gz")
+md5sums=('0e07111f65cd7768f992ff52cdd73a88')
+
+
+package() {
+ # Install script, service file and mkinitcpio hook
+ install -Dm644 "${srcdir}/hddapm.service" "${pkgdir}/usr/lib/systemd/system/hddapm.service"
+ install -Dm644 "${srcdir}/hddapm.initinstall" "${pkgdir}/usr/lib/initcpio/install/hddapm"
+ install -Dm644 "${srcdir}/10-hddapm.rules" "${pkgdir}/etc/udev/rules.d/10-hddapm.rules"
+}
+
+
+
+
diff --git a/systemd-hddapm.install b/systemd-hddapm.install
new file mode 100644
index 00000000000..d6e751c8c49
--- /dev/null
+++ b/systemd-hddapm.install
@@ -0,0 +1,20 @@
+post_install() {
+cat << EOF
+
+Edit '/etc/udev/rules.d/10-hddapm.rules' to configure the devices to change and
+the APM level to set for each one.
+Use 'udevadm info -a /dev/sdx' to obtain information about the attributes of the
+drives you wish to control.
+
+You have to manually enable the unit to have the APM level restored after
+suspend/hibernate/hybrid-sleep. You can do it with: 'systemctl enable hddapm'.
+
+If you wish to set the APM level early during boot, add hddapm to your HOOKS
+line in '/etc/mkinitcpio.conf' and regenerate your initramfs.
+
+EOF
+}
+
+post_upgrade() {
+ post_install
+}