Skip to content

Commit

Permalink
fix: VEC-333 add symlink in deb and rpm installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed Sep 6, 2024
1 parent 71b3631 commit c5942f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ pkg-deb-amd64:
cp $(BIN_DIR)/asvec-linux-amd64 $(BIN_DIR)/asvec
rm -rf $(BIN_DIR)/deb
mkdir -p $(BIN_DIR)/deb/DEBIAN
mkdir -p $(BIN_DIR)/deb/usr/local/aerospike/bin
mkdir -p $(BIN_DIR)/deb/opt/aerospike/bin
mkdir -p $(BIN_DIR)/deb/usr/bin
@ eval "$$amddebscript"
mv $(BIN_DIR)/asvec $(BIN_DIR)/deb/usr/local/aerospike/bin/
mv $(BIN_DIR)/asvec $(BIN_DIR)/deb/opt/aerospike/bin/
ln -s /opt/aerospike/bin/asvec $(BIN_DIR)/deb/usr/bin/asvec
sudo dpkg-deb -Zxz -b $(BIN_DIR)/deb
rm -f $(BIN_DIR)/packages/asvec-linux-amd64-${ver}.deb
mv $(BIN_DIR)/deb.deb $(BIN_DIR)/packages/asvec-linux-amd64-${ver}.deb
Expand All @@ -342,9 +344,11 @@ pkg-deb-arm64:
cp $(BIN_DIR)/asvec-linux-arm64 $(BIN_DIR)/asvec
rm -rf $(BIN_DIR)/deb
mkdir -p $(BIN_DIR)/deb/DEBIAN
mkdir -p $(BIN_DIR)/deb/usr/local/aerospike/bin
mkdir -p $(BIN_DIR)/deb/opt/aerospike/bin
mkdir -p $(BIN_DIR)/deb/usr/bin
@ eval "$$armdebscript"
mv $(BIN_DIR)/asvec $(BIN_DIR)/deb/usr/local/aerospike/bin/
mv $(BIN_DIR)/asvec $(BIN_DIR)/deb/opt/aerospike/bin/
ln -s /opt/aerospike/bin/asvec $(BIN_DIR)/deb/usr/bin/asvec
sudo dpkg-deb -Zxz -b $(BIN_DIR)/deb
rm -f $(BIN_DIR)/packages/asvec-linux-arm64-${ver}.deb
mv $(BIN_DIR)/deb.deb $(BIN_DIR)/packages/asvec-linux-arm64-${ver}.deb
Expand Down Expand Up @@ -392,7 +396,7 @@ pkg-rpm-amd64:
rm -rf $(BIN_DIR)/asvec-rpm-centos
cp -a $(BIN_DIR)/asvecrpm $(BIN_DIR)/asvec-rpm-centos
sed -i.bak "s/VERSIONHERE/${rpm_ver}/g" $(BIN_DIR)/asvec-rpm-centos/asvec.spec
cp $(BIN_DIR)/asvec-linux-amd64 $(BIN_DIR)/asvec-rpm-centos/usr/local/aerospike/bin/asvec
cp $(BIN_DIR)/asvec-linux-amd64 $(BIN_DIR)/asvec-rpm-centos/opt/aerospike/bin/asvec
rm -f $(BIN_DIR)/asvec-linux-x86_64.rpm
bash -ce "cd $(BIN_DIR) && rpmbuild --target=x86_64-redhat-linux --buildroot \$$(pwd)/asvec-rpm-centos -bb asvec-rpm-centos/asvec.spec"
rm -f $(BIN_DIR)/packages/asvec-linux-amd64-${rpm_ver}.rpm
Expand All @@ -403,7 +407,7 @@ pkg-rpm-arm64:
rm -rf $(BIN_DIR)/asvec-rpm-centos
cp -a $(BIN_DIR)/asvecrpm $(BIN_DIR)/asvec-rpm-centos
sed -i.bak "s/VERSIONHERE/${rpm_ver}/g" $(BIN_DIR)/asvec-rpm-centos/asvec.spec
cp $(BIN_DIR)/asvec-linux-arm64 $(BIN_DIR)/asvec-rpm-centos/usr/local/aerospike/bin/asvec
cp $(BIN_DIR)/asvec-linux-arm64 $(BIN_DIR)/asvec-rpm-centos/opt/aerospike/bin/asvec
rm -f $(BIN_DIR)/asvec-linux-arm64.rpm
bash -ce "cd $(BIN_DIR) && rpmbuild --target=arm64-redhat-linux --buildroot \$$(pwd)/asvec-rpm-centos -bb asvec-rpm-centos/asvec.spec"
rm -f $(BIN_DIR)/packages/asvec-linux-arm64-${rpm_ver}.rpm
Expand Down
8 changes: 5 additions & 3 deletions bin/asvecrpm/asvec.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Buildroot: ./
Name: asvec
Version: VERSIONHERE
Release: 2
Release: 1
Summary: Tool for deploying non-prod Aerospike server clusters on docker or in AWS
License: see github.com/aerospike/asvec
Group: aerospike
Expand All @@ -13,8 +13,10 @@ Group: aerospike

%description


Tool for deploying non-prod Aerospike server clusters on docker or in AWS

%files
"/usr/local/aerospike/bin/asvec"
/opt/aerospike/bin/asvec

%prep
ln -sf /opt/aerospike/bin/asvec %{buildroot}/usr/bin/asvec

0 comments on commit c5942f8

Please sign in to comment.