From 0ee62dfb0ccac9e0570e756b34b8593ac0eae96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=BC=BA=E5=BC=BA?= Date: Mon, 21 Sep 2020 11:13:51 +0800 Subject: [PATCH] Create vlmcsd.spec CentOS rpm build files --- vlmcsd.spec | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vlmcsd.spec diff --git a/vlmcsd.spec b/vlmcsd.spec new file mode 100644 index 0000000..96bd04a --- /dev/null +++ b/vlmcsd.spec @@ -0,0 +1,40 @@ +Summary: Microsoft Key Management System +Name: vlmcsd +Version: 0.0.1 +Release: 1%{?dist} +License: NULL +Source: %{name}-%{version}.tar.gz +URL: https://github.com/Wind4/vlmcsd +%description +Microsoft Key Management System + +%prep +rm -rf $RPM_BUILD_ROOT/* +%setup -q + +%install +install -d $RPM_BUILD_ROOT/ +cp -a * $RPM_BUILD_ROOT/ + +%files +%defattr(-,root,root,-) +%{_prefix}/local/vlmcsd/static/vlmcsd-x64-musl-static +%{_prefix}/local/vlmcsd/vlmcsd.service + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +ln -s %{_prefix}/local/vlmcsd/static/vlmcsd-x64-musl-static %{_bindir}/vlmcsd +ln -s %{_prefix}/local/vlmcsd/vlmcsd.service %{_prefix}/lib/systemd/system + +%preun +systemctl disable vlmcsd.service +systemctl stop vlmcsd.service + +%postun +rm -rf /usr/local/vlmcsd +rm -rf /usr/lib/systemd/system/vlmcsd.service +rm -rf /usr/bin/vlmcsd + +%changelog