-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also, link stdlib++ and libgcc statically. Signed-off-by: Roman Gershman <[email protected]>
- Loading branch information
Showing
13 changed files
with
149 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "helio", | ||
"image": "ghcr.io/romange/fedora:30", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cmake-tools", | ||
"ms-vscode.cpptools-themes", | ||
"twxs.cmake" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Get the full path of the binary | ||
ARCHIVE=$(realpath "$1") | ||
VERSION="$2" | ||
echo "Preparing $ARCHIVE" | ||
|
||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" | ||
|
||
# Setup RPM build environment in a unique subdirectory under /tmp | ||
RPM_ROOT=$(mktemp -d /tmp/rpmbuild_XXXXXX) | ||
echo "Working dir is $RPM_ROOT" | ||
mkdir -p $RPM_ROOT/{BUILD,RPMS,SOURCES,SPECS} | ||
|
||
# Put the archive and configuration files to the SOURCES directory | ||
ln -s "$ARCHIVE" -t "$RPM_ROOT/SOURCES/" | ||
cp $SCRIPT_DIR/dragonfly.service $RPM_ROOT/SOURCES/ | ||
cp $SCRIPT_DIR/dragonfly.conf $RPM_ROOT/SOURCES/ | ||
|
||
cp $SCRIPT_DIR/dragonfly.spec $RPM_ROOT/SPECS/ | ||
|
||
rpmbuild --define "_topdir $RPM_ROOT" --define "version $VERSION" -bb "$RPM_ROOT/SPECS/dragonfly.spec" | ||
mv $RPM_ROOT/RPMS/*.rpm ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../debian/dragonfly.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../debian/dragonfly.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
%define pkg_name dragonfly | ||
%define archive dragonfly-%{_arch}.tar.gz | ||
|
||
# How the package name looks like | ||
%define _build_name_fmt %%{NAME}.%%{ARCH}.rpm | ||
|
||
Name: %{pkg_name} | ||
Version: %{version} | ||
Release: 1%{?dist} | ||
Summary: DragonflyDB memory store | ||
License: BUSL-1.1 | ||
URL: https://www.dragonflydb.io | ||
Source0: %{archive} | ||
Source1: dragonfly.service | ||
Source2: dragonfly.conf | ||
Group: Applications/System | ||
Provides: user(dfly) | ||
Provides: group(dfly) | ||
|
||
%description | ||
DragonflyDB is a vertically scalable and memory efficient in-memory store | ||
that is compatible with Redis OSS and Memcached. | ||
|
||
%pre | ||
|
||
getent group dfly >/dev/null || groupadd -r dfly | ||
getent passwd dfly >/dev/null || useradd -r -g dfly -M -s /sbin/nologin -c "User for DragonflyDB service" dfly | ||
|
||
%prep | ||
|
||
%build | ||
tar xvfz %{SOURCE0} | ||
mv ./dragonfly-%{_arch} ./dragonfly | ||
|
||
%install | ||
mkdir -p %{buildroot}/usr/local/bin | ||
mkdir -p %{buildroot}/etc/dragonfly | ||
|
||
install -m 755 ./dragonfly %{buildroot}/usr/local/bin/ | ||
mkdir -p %{buildroot}/usr/lib/systemd/system | ||
cp %{SOURCE1} %{buildroot}/usr/lib/systemd/system/ | ||
cp %{SOURCE2} %{buildroot}/etc/dragonfly/ | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
rm -rf %{_builddir}/* | ||
|
||
%files | ||
%attr(-,dfly,dfly) /usr/local/bin/dragonfly | ||
%attr(-,dfly,dfly) /usr/lib/systemd/system/dragonfly.service | ||
%attr(-,dfly,dfly) /etc/dragonfly/dragonfly.conf | ||
|
||
%changelog |