Skip to content

Commit

Permalink
build: tools-2773 symlink deb rpm asconfig to /usr/bin/asconfig (#25)
Browse files Browse the repository at this point in the history
* build: symlink deb rpm asconfig to /usr/bin/asconfig
  • Loading branch information
dwelch-spike authored Nov 21, 2023
1 parent 08095d9 commit 4d5b50d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ CONFIG_DIR = /etc/aerospike

# Package variables
NAME = "asconfig"
VERSION = $(shell git describe --tags --always | cut -c 2-)
VERSION = $(shell git describe --tags --always)
MAINTAINER = "Aerospike"
DESCRIPTION = "Asconfig, a tool for managing Aerospike database configuration files."
LICENSE = "Apache License 2.0"
URL = "https://github.com/aerospike/asconfig"
VENDOR = "Aerospike, Inc."
ARCH = $(shell uname -m)


.PHONY: all
Expand All @@ -33,7 +34,7 @@ deb: prep
--license $(LICENSE) \
--url $(URL) \
--vendor $(VENDOR) \
--package $(TARGET_DIR)/asconfig-$(VERSION)-amd64.deb
--package $(TARGET_DIR)/asconfig-$(VERSION)-$(ARCH).deb

.PHONY: rpm
rpm: prep
Expand All @@ -49,7 +50,7 @@ rpm: prep
--license $(LICENSE) \
--url $(URL) \
--vendor $(VENDOR) \
--package $(TARGET_DIR)/asconfig-$(VERSION)-x86_64.rpm
--package $(TARGET_DIR)/asconfig-$(VERSION)-$(ARCH).rpm

.PHONY: tar
tar: prep
Expand All @@ -65,13 +66,16 @@ tar: prep
--license $(LICENSE) \
--url $(URL) \
--vendor $(VENDOR) \
--package $(TARGET_DIR)/asconfig-$(VERSION).tar
--package $(TARGET_DIR)/asconfig-$(VERSION)-$(ARCH).tar

.PHONY: prep
prep:
install -d $(TARGET_DIR)
install -d $(BUILD_DIR)/$(CONFIG_DIR)
install -d $(BUILD_DIR)/opt/aerospike/bin
install -pm 755 $(TOP_DIR)/asconfig $(BUILD_DIR)/opt/aerospike/bin
install -d $(BUILD_DIR)/usr/bin
ln -sf /opt/aerospike/bin/asconfig $(BUILD_DIR)/usr/bin/asconfig

.PHONY: clean
clean:
Expand Down

0 comments on commit 4d5b50d

Please sign in to comment.