Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create PKGBUILD #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions packages/hwinfo/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# x86
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Gergely Imreh <imrehg@gmail.com>
# Contributor: champus
# Contributor: madeye
# Contributor: ranguvar
# Contributor: ninja_pt
# x86, aarch64
# Mantainer: Mattia Procopio <matto.astro@gmail.com>

pkgname=hwinfo
pkgver=23.2
pkgrel=1
pkgdesc='Hardware detection tool from openSUSE'
arch=(x86_64 aarch64)
url='https://github.com/openSUSE/hwinfo'
license=(GPL2)
depends=('libx86emu=3.5' perl-xml-parser perl-xml-writer)
makedepends=(flex git sysfsutils)
options=(!emptydirs)
source=(custom_ioctl.patch
"git+$url#commit=c87f449f1d4882c71b0a1e6dc80638224a5baeed") # tag: 23.2
b2sums=('2b1bd3b53bbfc1e545e1a70ffd6cca08f704639a104928b2c02ccca3e82000f07a470fbdf129566ece6dfb2b98fdad0e82f18cc5c2016ebfeed043b4edb295b4'
'SKIP')

prepare() {
cd $pkgname
patch -p1 -i ../custom_ioctl.patch
echo touch changelog > git2log
sed -i '/linux\/fs.h/d' src/hd/hd.c
}

build() {
make -C $pkgname -j1 \
CFLAGS+="-fPIC -I$srcdir/$pkgname/src/hd -w" \
HWINFO_VERSION="$pkgver" \
LIBDIR=/usr/lib
}

package() {
cd $pkgname

make DESTDIR="$pkgdir" LIBDIR=/usr/lib install
mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
rmdir "$pkgdir/sbin"

cd doc
for f in *.1; do install -Dm644 $f "$pkgdir/usr/share/man/man1/$f"; done
for f in *.8; do install -Dm644 $f "$pkgdir/usr/share/man/man8/$f"; done
}