Search beyond keywords - This directory contains scripts and configuration files for building distribution packages (Debian .deb and RPM .rpm) for hlquery.
./build.shThis will build both Debian and RPM packages in the dist/ directory.
# Build only Debian package
./build.sh --type deb
# Build only RPM package
./build.sh --type rpm### Build all packages
make
### Build specific package type
make deb
make rpm
### Clean build directories
make cleanbuild-essentialzlib1g-devlibssl-devdpkg-devfakeroot(recommended for proper file ownership)cmakegit
Install on Debian/Ubuntu:
$ sudo apt-get update
$ sudo apt-get install build-essential zlib1g-dev libssl-dev dpkg-dev fakeroot cmake gitOr use the bundled helper:
$ ./install-deps-debian.shrpm-buildgcc-c++makeopenssl-develzlib-develcmakegittargzip
Install on RedHat/CentOS/Fedora:
$ sudo dnf install rpm-build gcc-c++ make openssl-devel zlib-devel cmake git tar gzipOr use the bundled helper:
$ ./install-deps-rpm.sh# Build with default settings (clones from GitHub unstable branch)
$ ./build.sh
# Build from a specific Git branch or tag
$ ./build.sh --git-version 1.0.0
# Build with custom package version
$ ./build.sh --version 1.0.0 --release 1
# Build for specific architecture
$ ./build.sh --arch x86_64# Build with all options
$ ./build.sh \
--type all \
--version 1.0.0 \
--git-version v1.0.0 \
--release 1 \
--arch x86_64
# Build from a specific branch
$ ./build.sh --git-version develop --version 1.1.0-dev
# Clean build directories
$ ./build.sh --clean--type TYPE: Package type to build (deb,rpm, orall)--version VER: Package version (default:1.0.0)--git-version VER: Git branch or tag to clone (default:unstable)- Examples:
unstable,1.0.0,v1.0.0,develop
- Examples:
--release REL: Package release number (default:1)--arch ARCH: Target architecture (default: auto-detect)--clean: Clean build directories and exit--help: Show help message
You can also set these via environment variables:
$ export VERSION=1.0.0
$ export GIT_VERSION=unstable
$ export RELEASE=1
$ export ARCH=x86_64
$ export BUILD_MODE=release
$ ./build.shThe Debian package includes:
- Binary files:
/usr/bin/hlquery,/usr/bin/hlquery-cli - Configuration:
/etc/hlquery/ - Data directories:
/var/lib/hlquery,/var/log/hlquery,/run/hlquery - Systemd service:
/lib/systemd/system/hlquery.service(if available)
The RPM package includes:
- Binary files:
/usr/bin/hlquery,/usr/bin/hlquery-cli - Configuration:
/etc/hlquery/ - Data directories:
/var/lib/hlquery,/var/log/hlquery,/run/hlquery - Systemd service:
/usr/lib/systemd/system/hlquery.service(if available)
# Install package
$ sudo dpkg -i dist/hlquery_1.0.0-1_amd64.deb
# Fix dependencies if needed
$ sudo apt-get install -f
# Verify installation
$ hlquery-cli status# Install package
$ sudo rpm -ivh dist/hlquery-1.0.0-1.x86_64.rpm
# Or use yum/dnf
$ sudo yum install dist/hlquery-1.0.0-1.x86_64.rpm
$ sudo dnf install dist/hlquery-1.0.0-1.x86_64.rpm
# Verify installation
$ hlquery-cli statusThe build process follows these steps:
- Clone Source: Clones hlquery source code from GitHub (https://github.com/hlquery/hlquery)
- Source Build: Configures the source tree for the target packaging layout and compiles hlquery
- Installation: Installs files into a staged filesystem tree using
DESTDIR - Package Creation: Creates package structure and metadata
- Package Building: Builds the final package file
The build script automatically clones the specified version from GitHub, so you don't need the source code locally.
build.sh: Main build script that orchestrates the build processbuild-deb.sh: Builds Debian packagesbuild-rpm.sh: Builds RPM packages
Edit the variables in build.sh:
PACKAGE_NAME="hlquery"
MAINTAINER="Your Name <your.email@example.com>"
DESCRIPTION="Your custom description"
URL="https://your-website.com"Modify the respective build scripts:
- Debian: Edit
build-deb.shto add files to$DEB_DIR - RPM: Edit
build-rpm.shspec file to add files to%filessection
Edit the package control files:
- Debian: Modify
Depends:inbuild-deb.sh - RPM: Modify
Requires:inbuild-rpm.shspec file
Install required build tools:
# Debian/Ubuntu
sudo apt-get install dpkg-dev fakeroot rpm-build
# RedHat/CentOS/Fedora
sudo dnf install rpm-build dpkg-devCheck package contents:
# Debian
dpkg -c dist/hlquery_1.0.0-1_amd64.deb
# RPM
rpm -qlp dist/hlquery-1.0.0-1.x86_64.rpmFor issues or questions: