Created
July 15, 2019 03:11
-
-
Save jeremyxu2010/c33483f1b88dedc5ee53da53c9fdeb03 to your computer and use it in GitHub Desktop.
predixy的rpm打包spec文件
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
%define debug_package %{nil} | |
Name: predixy | |
Version: 1.0.5 | |
Release: 1%{?dist} | |
Summary: Predixy is a redis smart proxy. It supports redis sentinel and redis cluster. | |
Group: Development/Databases | |
License: BSD 3 | |
URL: https://github.com/joyieldInc/predixy | |
Source0: predixy-1.0.5-bin-amd64-linux.tar.gz | |
Autoreq: 0 | |
%description | |
Predixy is a redis smart proxy. It supports redis sentinel and redis cluster. | |
%prep | |
%setup -q | |
%build | |
%install | |
mkdir -p %{buildroot}/opt/predixy-1.0.5/ | |
cp -r ./* %{buildroot}/opt/predixy-1.0.5/ | |
mkdir -p %{buildroot}/usr/lib/systemd/system | |
cat << EOF > %{buildroot}/usr/lib/systemd/system/predixy.service | |
[Unit] | |
Description=Redis predixy proxy service | |
After=network.target | |
[Service] | |
User=root | |
Group=root | |
PermissionsStartOnly=true | |
ExecStart=/opt/predixy-1.0.5/bin/predixy /opt/predixy-1.0.5/conf/predixy.conf | |
Restart=always | |
LimitNOFILE=10240 | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
%files | |
%defattr (-,root,root) | |
%config(noreplace) /opt/predixy-1.0.5/conf/*.conf | |
/opt/predixy-1.0.5 | |
/usr/lib/systemd/system/predixy.service | |
%changelog | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment