summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-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 000000000000..c3706c56e665
--- /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 000000000000..027271b9b22c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+files
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9051aa6984de
--- /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 000000000000..d6e751c8c49c
--- /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
+}