Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions pkg/apk/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ build() {
set +e
cmake -B build -DINTEGRATE_VCPKG=ON -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_MAKE_PROGRAM=make \
-DCMAKE_INSTALL_PREFIX="$pkgdir" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DBUILD_TESTS=OFF -DBUILD_DYNAMIC_LIB=ON -DBUILD_STATIC_LIB=ON \
$ROOT_DIR
if [[ $? -ne 0 ]]; then
Expand All @@ -53,8 +53,11 @@ build() {
fi
set -e
cmake --build build -j8
$ROOT_DIR/build-support/merge_archives_vcpkg.sh $PWD/build
}

package() {
cmake --build build --target install
set -x -e
DESTDIR="$pkgdir" cmake --build build --target install
cp ./build/libpulsarwithdeps.a "$pkgdir/usr/lib/"
}
9 changes: 9 additions & 0 deletions pkg/apk/build-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ sudo abuild-keygen -a -i -n
abuild -F -c -r

cp -r /root/packages/pkg ./build

# Test installation
apk add --allow-untrusted build/$PLATFORM/*.apk

cd $ROOT_DIR/win-examples
g++ -o dynamic.out -std=c++11 ./example.cc -Wl,-rpath=/usr/lib -lpulsar
./dynamic.out
g++ -o static.out -std=c++11 ./example.cc /usr/lib/libpulsarwithdeps.a -lpthread -ldl
./static.out