Fix rk3399 PKGBUILD
@@ -19,26 +19,12 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-prepare() {
- cd "${srcdir}/${pkgname%-rk3399-git}"
- if [[ ! -d ./build ]]; then
- mkdir build && cd build
- cmake .. -DRK3399=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
- fi
-}
-
build() {
- cd "$srcdir/${pkgname%-rk3399-git}/build"
- make -j$(nproc)
+ cmake -B build -S "${pkgname%-rk3399-git}" -DRK3399=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
+ make -C build
}
package() {
- cd "$srcdir/${pkgname%-arm-git}/build"
+ cd "$srcdir/${pkgname%-rk3399-git}/build"
make DESTDIR="${pkgdir}/" install
- # /usr/local/bin isn't in PATH by the default,
- # we should move it to /usr/bin
- cd ${pkgdir}
- mv usr/local/bin/ usr/bin/
- # cleanup when dir is empty
- rmdir usr/local || exit 0
}
