diff options
author | Tony Lambiris | 2021-08-04 22:56:57 -0400 |
---|---|---|
committer | Tony Lambiris | 2021-08-04 22:56:57 -0400 |
commit | 6b4d9bbe19e77eefafbe7514e1e7021853fbc8b0 (patch) | |
tree | 924c5ae5ba8e98368e3c61d236207957947dac98 | |
parent | dab1873f19851395d945320798e2362a4a1428fc (diff) | |
download | aur-6b4d9bbe19e77eefafbe7514e1e7021853fbc8b0.tar.gz |
Version bump
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | graphics.patch | 18 | ||||
-rw-r--r-- | makefile.patch | 11 | ||||
-rw-r--r-- | mkinitcpio.patch | 22 | ||||
-rw-r--r-- | system76-power-git.install | 66 |
6 files changed, 59 insertions, 106 deletions
@@ -1,9 +1,8 @@ pkgbase = system76-power-git pkgdesc = System76 Power Management - pkgver = 1.1.16.r17.gb74bcb7 + pkgver = 1.1.17.r1.g82bf0f4 pkgrel = 1 url = https://github.com/pop-os/system76-power - install = system76-power-git.install arch = any license = GPL makedepends = git @@ -14,9 +13,10 @@ pkgbase = system76-power-git provides = system76-power conflicts = system76-power source = system76-power-git::git+https://github.com/pop-os/system76-power.git - source = graphics.patch + source = makefile.patch + source = mkinitcpio.patch sha256sums = SKIP - sha256sums = c44423e11bbe3f045203ef5b836f64151728aec0762d798295a1787092fecf1b + sha256sums = 97deb1f9cf6a312e8378bb96a4a83dae2498a4936c130e2ef5b125d13b92bb65 + sha256sums = 2ead269c71919c220a7880b0036c6d62aadeae3d6cde769029784d3565686539 pkgname = system76-power-git - @@ -1,43 +1,47 @@ # Maintainer: Tony Lambiris <tony@libpcap.net> pkgname=system76-power-git -pkgver=1.1.16.r17.gb74bcb7 +pkgver=1.1.17.r1.g82bf0f4 pkgrel=1 pkgdesc="System76 Power Management" arch=('any') url="https://github.com/pop-os/system76-power" license=('GPL') -install=system76-power-git.install conflicts=("system76-power") provides=("system76-power") makedepends=('git' 'rust') depends=('dbus' 'systemd' 'system76-dkms') source=("${pkgname}::git+https://github.com/pop-os/system76-power.git" - "graphics.patch") + "makefile.patch" + "mkinitcpio.patch") sha256sums=('SKIP' - 'c44423e11bbe3f045203ef5b836f64151728aec0762d798295a1787092fecf1b') + '97deb1f9cf6a312e8378bb96a4a83dae2498a4936c130e2ef5b125d13b92bb65' + '2ead269c71919c220a7880b0036c6d62aadeae3d6cde769029784d3565686539') pkgver() { - cd ${pkgname} + cd "${srcdir}/${pkgname}" - #printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/${pkgname}" + + # use mkinitcpio -P inplace of update-initramfs -u + patch --no-backup-if-mismatch -Np1 -i "${srcdir}/mkinitcpio.patch" + + # fix makefile + patch --no-backup-if-mismatch -Np1 -i "${srcdir}/makefile.patch" } build() { - cd ${pkgname} + cd "${srcdir}/${pkgname}" - # Build and install base package - cargo build --release + make } package() { - # Install daemons - install -Dm755 ${srcdir}/${pkgname}/target/release/system76-power ${pkgdir}/usr/bin/system76-power - - # Install systemd unit files - install -Dm644 ${srcdir}/${pkgname}/debian/system76-power.service ${pkgdir}/usr/lib/systemd/system/system76-power.service + cd "${srcdir}/${pkgname}" - # Install scripts and configuration - install -Dm755 ${srcdir}/${pkgname}/data/system76-power.conf ${pkgdir}/usr/share/dbus-1/system.d/system76-power.conf + make sysconfdir="/usr/lib" DESTDIR="${pkgdir}" install } diff --git a/graphics.patch b/graphics.patch deleted file mode 100644 index e9ba30e4cbc6..000000000000 --- a/graphics.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/graphics.rs b/src/graphics.rs -index d9d8af7..a8cb466 100644 ---- a/src/graphics.rs -+++ b/src/graphics.rs -@@ -248,10 +248,10 @@ impl Graphics { - warn!("systemctl: failed with {} (not an error if service does not exist!)", status); - } - -- info!("Updating initramfs"); -- const UPDATE_INITRAMFS_CMD: &str = "update-initramfs"; -+ info!("Updating mkinitcpio"); -+ const UPDATE_INITRAMFS_CMD: &str = "mkinitcpio"; - let status = process::Command::new(UPDATE_INITRAMFS_CMD) -- .arg("-u") -+ .arg("-P") - .status() - .map_err(|why| GraphicsDeviceError::Command { cmd: UPDATE_INITRAMFS_CMD, why })?; - diff --git a/makefile.patch b/makefile.patch new file mode 100644 index 000000000000..c60736d50d62 --- /dev/null +++ b/makefile.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,7 @@ distclean: + + install: all + install -D -m 0755 "target/release/$(BIN)" "$(DESTDIR)$(bindir)/$(BIN)" +- install -D -m 0644 "data/$(BIN).conf" "$(DESTDIR)$(sysconfdir)/dbus-1/system.d/$(BIN).conf" ++ install -D -m 0644 "data/$(BIN).conf" "$(DESTDIR)$(datadir)/dbus-1/system.d/$(BIN).conf" + install -D -m 0644 "debian/$(BIN).service" "$(DESTDIR)$(sysconfdir)/systemd/system/$(BIN).service" + install -D -m 0644 "data/$(POLICY).policy" $(DESTDIR)$(datadir)/polkit-1/actions/$(POLICY).policy + diff --git a/mkinitcpio.patch b/mkinitcpio.patch new file mode 100644 index 000000000000..fee4a47c8677 --- /dev/null +++ b/mkinitcpio.patch @@ -0,0 +1,22 @@ +--- a/src/graphics.rs ++++ b/src/graphics.rs +@@ -76,7 +76,7 @@ pub enum GraphicsDeviceError { + SysFs(io::Error), + #[error(display = "failed to unbind {} on PCI driver {}: {}", func, driver, why)] + Unbind { func: String, driver: String, why: io::Error }, +- #[error(display = "update-initramfs failed with {} status", _0)] ++ #[error(display = "failed to update initramfs: exit status {}", _0)] + UpdateInitramfs(ExitStatus), + } + +@@ -423,9 +423,9 @@ impl Graphics { + } + + log::info!("Updating initramfs"); +- const UPDATE_INITRAMFS_CMD: &str = "update-initramfs"; ++ const UPDATE_INITRAMFS_CMD: &str = "mkinitcpio"; + let status = process::Command::new(UPDATE_INITRAMFS_CMD) +- .arg("-u") ++ .arg("-P") + .status() + .map_err(|why| GraphicsDeviceError::Command { cmd: UPDATE_INITRAMFS_CMD, why })?; diff --git a/system76-power-git.install b/system76-power-git.install deleted file mode 100644 index 3c8592a48d15..000000000000 --- a/system76-power-git.install +++ /dev/null @@ -1,66 +0,0 @@ -_services="system76-power.service" - -_stop_services() { - for service in $_services; do - if /usr/bin/systemctl -q is-active $service >/dev/null 2>&1; then - /usr/bin/systemctl stop $service >/dev/null 2>&1 - fi - done -} - -_disable_services() { - for service in $_services; do - if /usr/bin/systemctl -q is-enabled $service >/dev/null 2>&1; then - /usr/bin/systemctl disable $service >/dev/null 2>&1 - /usr/bin/systemctl reset-failed $service >/dev/null 2>&1 - fi - done -} - -_restore_services() { - for service in $_services; do - if /usr/bin/systemctl -q is-enabled $service >/dev/null 2>&1; then - /usr/bin/systemctl start $service > /dev/null 2>&1 - fi - done -} - -post_install() { -cat << EOF - - The System76 Power package provides the following system services: - - system76-power.service System76 power support - - And the following application - - system76-power System76 power CLI interface - - To run system76-power as a normal user, add them to the "adm" group. - -EOF -} - -pre_upgrade() { - _stop_services -} - -post_upgrade() { - /usr/bin/systemctl daemon-reload >/dev/null 2>&1 - _restore_services - post_install -} - -pre_remove() { - _stop_services - _disable_services -} - -post_remove() { - /usr/bin/systemctl daemon-reload >/dev/null 2>&1 - cat << EOF - - Be sure to stop and disable all running System76 user services. - -EOF -} |