diff --git a/pkg.info b/pkg.info index 2f92b87..5826b40 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: enit description: The official init system for Tide Linux -version: 0.3.3 +version: 0.4.0 revision: 1 url: https://github.com/EnumeratedDev/enit license: MIT @@ -8,13 +8,11 @@ architecture: any output_architecture: x86_64 type: source keep: - - etc/esvm/enabled_services + - etc/esvm/enabled-services.yml make_depends: - - git - golang downloads: - - url: https://github.com/EnumeratedDev/enit.git - type: git - clone_to: ${BPM_SOURCE} - git_branch: ${BPM_PKG_VERSION} - checksum: bcff6fecf8c0f2a230142159a5b1da9f6762426b + - url: https://github.com/EnumeratedDev/enit/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: b3ed910f07afcda56e62a8fa5f15da086d9b5775a55fa32e71aa65cc635d2bd4 diff --git a/pre_update.sh b/pre_update.sh new file mode 100644 index 0000000..9c18fea --- /dev/null +++ b/pre_update.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Rename 'enabled_services' file to 'enabled-services.yml' +if [ `bpm vercmp "$BPM_PKG_OLD_VERSION" 0.3.3` -le 0 ]; then + if [ -f /etc/esvm/enabled_services ]; then + mv /etc/esvm/enabled_services /etc/esvm/enabled-services.yml + fi +fi diff --git a/source-files/enabled_services b/source-files/enabled-services.yml similarity index 100% rename from source-files/enabled_services rename to source-files/enabled-services.yml diff --git a/source.sh b/source.sh index 1a6254c..a0d1b89 100644 --- a/source.sh +++ b/source.sh @@ -5,7 +5,8 @@ # The build function is executed in the source directory # This function is used to compile the source code build() { - make PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var + export GOFLAGS="-modcacherw" + make PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var VERSION="$BPM_PKG_VERSION" } # The package function is executed in the source directory @@ -15,7 +16,7 @@ package() { make DESTDIR="$BPM_OUTPUT" PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var install-services # Install default enabled services file - install -Dm644 "$BPM_WORKDIR"/enabled_services "$BPM_OUTPUT"/etc/esvm/enabled_services + install -Dm644 "$BPM_WORKDIR"/enabled-services.yml "$BPM_OUTPUT"/etc/esvm/enabled-services.yml # Create shortcut scripts for ectl power commands for cmd in shutdown poweroff halt reboot restart; do