Fix RPM build: correct tarball structure, add Source0 to spec, restore script permissions
This commit is contained in:
0
build-arch.sh
Normal file → Executable file
0
build-arch.sh
Normal file → Executable file
12
build-rpm.sh
12
build-rpm.sh
@ -26,13 +26,11 @@ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
|||||||
# Create source tarball (required by %autosetup in spec file)
|
# Create source tarball (required by %autosetup in spec file)
|
||||||
echo "Creating source tarball..."
|
echo "Creating source tarball..."
|
||||||
VERSION="1.0.0"
|
VERSION="1.0.0"
|
||||||
tar -czf ~/rpmbuild/SOURCES/linux-patch-api-${VERSION}.tar.gz \
|
TMPDIR=$(mktemp -d)
|
||||||
--exclude='target' \
|
mkdir -p "$TMPDIR/linux-patch-api-${VERSION}"
|
||||||
--exclude='.git' \
|
rsync -a --exclude='target' --exclude='.git' --exclude='releases' --exclude='.github' --exclude='debian' ./ "$TMPDIR/linux-patch-api-${VERSION}/"
|
||||||
--exclude='releases' \
|
tar -czf ~/rpmbuild/SOURCES/linux-patch-api-${VERSION}.tar.gz -C "$TMPDIR" "linux-patch-api-${VERSION}"
|
||||||
--exclude='.github' \
|
rm -rf "$TMPDIR"
|
||||||
--exclude='debian' \
|
|
||||||
.
|
|
||||||
|
|
||||||
# Copy spec file
|
# Copy spec file
|
||||||
echo "Preparing spec file..."
|
echo "Preparing spec file..."
|
||||||
|
|||||||
@ -4,6 +4,7 @@ Release: 1%{?dist}
|
|||||||
Summary: Secure remote package management API for Linux systems
|
Summary: Secure remote package management API for Linux systems
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://gitea.moon-dragon.us/echo/linux_patch_api
|
URL: https://gitea.moon-dragon.us/echo/linux_patch_api
|
||||||
|
Source0: linux-patch-api-%{version}.tar.gz
|
||||||
BuildArch: x86_64
|
BuildArch: x86_64
|
||||||
|
|
||||||
# Build requirements
|
# Build requirements
|
||||||
|
|||||||
Reference in New Issue
Block a user