[Why] Old source "https://www.kernel.org/pub/linux/utils/rt-tests/rt-tests-1.8.tar.gz" is not available, and need build before package.
Signed-off-by: Zhang Yale zhangyale3@huawei.com --- pkg/hackbench/PKGBUILD | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/pkg/hackbench/PKGBUILD b/pkg/hackbench/PKGBUILD index 797a00e6..94049599 100644 --- a/pkg/hackbench/PKGBUILD +++ b/pkg/hackbench/PKGBUILD @@ -2,13 +2,19 @@ pkgname=hackbench pkgver=1.8 pkgrel=1 arch=('i386' 'x86_64') -url="https://www.kernel.org/pub/linux/utils/rt-tests" +url="https://github.com/lacombar/hackbench.git" license=('GPL') -source=("https://www.kernel.org/pub/linux/utils/rt-tests/rt-tests-$%7Bpkgver%7D.tar.g...") +source=("https://github.com/lacombar/hackbench.git") sha256sums=('SKIP')
-package() { +build() +{ + cd "${srcdir}/${pkgname}/${pkgname}" || exit + gcc -o hackbench hackbench.c -lpthread +} + +package() +{ mkdir -p "${pkgdir}/lkp/benchmarks/${pkgname}" - cd "$srcdir/rt-tests-${pkgver}" - make install DESTDIR="${pkgdir}/lkp/benchmarks/${pkgname}" + cp -rf "${srcdir}/${pkgname}/${pkgname}" "${pkgdir}/lkp/benchmarks/${pkgname}" }
-package() { +build() +{
- cd "${srcdir}/${pkgname}/${pkgname}" || exit
- gcc -o hackbench hackbench.c -lpthread
+}
+package() +{ mkdir -p "${pkgdir}/lkp/benchmarks/${pkgname}"
- cd "$srcdir/rt-tests-${pkgver}"
- make install DESTDIR="${pkgdir}/lkp/benchmarks/${pkgname}"
- cp -rf "${srcdir}/${pkgname}/${pkgname}" "${pkgdir}/lkp/benchmarks/${pkgname}"
I think you'd better change the functionname, there is no any package action.
Thanks, Xijian
On Fri, Oct 30, 2020 at 10:51:12AM +0800, Wang Yong wrote:
On Fri, Oct 30, 2020 at 10:48:37AM +0800, Xu Xijian wrote:
I think you'd better change the functionname, there is no any package action.
It's pkgbuild, no need to do this.
Thanks, Wang Yong
What does it mean? I thought that "package" means this function do "make install" before, but the "make install" is deleted now, it just do some copy.
Thanks, Xijian
On Fri, Oct 30, 2020 at 11:38:55AM +0800, Xu Xijian wrote:
On Fri, Oct 30, 2020 at 10:51:12AM +0800, Wang Yong wrote:
On Fri, Oct 30, 2020 at 10:48:37AM +0800, Xu Xijian wrote:
I think you'd better change the functionname, there is no any package action.
It's pkgbuild, no need to do this.
Thanks, Wang Yong
What does it mean? I thought that "package" means this function do "make install" before, but the "make install" is deleted now, it just do some copy.
It'll called by makepkg script.
Thanks, Wang Yong
On Fri, Oct 30, 2020 at 11:38:55AM +0800, Xu Xijian wrote:
On Fri, Oct 30, 2020 at 10:51:12AM +0800, Wang Yong wrote:
On Fri, Oct 30, 2020 at 10:48:37AM +0800, Xu Xijian wrote:
I think you'd better change the functionname, there is no any package action.
It's pkgbuild, no need to do this.
Thanks, Wang Yong
What does it mean? I thought that "package" means this function do "make install" before, but the "make install" is deleted now, it just do some copy.
Thanks, Xijian
It's PKGBUILD not a alone script file. PKGBUILD should be used in conjunction with makepkg. The package() function is used to install files into the directory that will become the root directory of the built package for makepkg. refer to https://jlk.fjfi.cvut.cz/arch/manpages/man/PKGBUILD.5
make install is needless after the source is changed. or install -Dt "${pkgdir}/lkp/benchmarks/${pkgname}" -m644 "${srcdir}/${pkgname}/${pkgname}" will make you look more comfortable.
Thanks, Jiaxin