diff --git a/Makefile b/Makefile index b66a1a5..25b4ff6 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/bin/asvecrpm/asvec.spec b/bin/asvecrpm/asvec.spec index d8abe63..ffb9c6d 100644 --- a/bin/asvecrpm/asvec.spec +++ b/bin/asvecrpm/asvec.spec @@ -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 @@ -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