# Maintainer: Stephan Eisvogel _commit_ipmctl=#commit=c75bd840ea7820c8f93a5488fcff75d08beedd51 _commit_edk2=#commit=41abf00bf98e36830974bd669ab7ec3679bd5e67 pkgname=ipmctl pkgver=v03.00.00.0485 pkgrel=1 pkgdesc="Utility for configuring and managing Intel Optane Persistent Memory modules (PMem)" arch=('x86_64') url="https://github.com/intel/ipmctl" license=(BSD) depends=("ndctl" "glibc") makedepends=("cmake" "git" "python") backup=("etc/ipmctl/ipmctl.conf") source=( "ipmctl::git+https://github.com/intel/ipmctl.git${_commit_ipmctl}" "edk2::git+https://github.com/tianocore/edk2.git${_commit_edk2}" ipmctl.tmpfile ) sha256sums=('SKIP' 'SKIP' 'SKIP') prepare() { cd "${srcdir}"/ipmctl mkdir build ./updateedk.sh sed -i 's/^.*Werror/#&/' CMakeLists.txt sed -i 's/\r$//g' MdePkg/Include/Base.h sed -i 's#/var/log/ipmctl/#/run/ipmctl/#g' src/os/ini/ipmctl_default.c src/os/ini/ini.c patch -p1 < src/os/patches/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch } build() { cd "${srcdir}"/ipmctl/build cmake \ -DRELEASE=ON \ -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr \ .. make } package() { cd "${srcdir}"/ipmctl/build make install cd "${pkgdir}" rm -rf usr/etc/ usr/include/ usr/lib/pkgconfig/ usr/var/ mkdir etc chmod 755 etc mv usr/share/ipmctl etc/ mkdir -p usr/share/licenses/ipmctl chmod 755 usr/share/licenses usr/share/licenses/ipmctl mv "${pkgdir}/usr/share/doc/ipmctl/LICENSE" "${pkgdir}/usr/share/licenses/ipmctl/LICENSE" install -D -m 644 "${srcdir}/ipmctl.tmpfile" "${pkgdir}/usr/lib/tmpfiles.d/ipmctl.conf" }