rpmbuild -ba zerotier-one.spec basically works

This commit is contained in:
Adam Ierymenko 2016-06-08 15:33:59 -07:00
parent 536feb632c
commit f9056da6be
2 changed files with 22 additions and 7 deletions

View File

@ -165,15 +165,15 @@ install: FORCE
mkdir -p $(DESTDIR)/usr/bin
rm -f $(DESTDIR)/usr/bin/zerotier-cli
rm -f $(DESTDIR)/usr/bin/zerotier-idtool
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-cli
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-idtool
ln -rs $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-cli
ln -rs $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-idtool
mkdir -p $(DESTDIR)/var/lib/zerotier-one
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-one
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-one
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
ln -rs $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-one
ln -rs $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
ln -rs $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
mkdir -p $(DESTDIR)/usr/share/man/man8
rm -f $(DESTDIR)/usr/share/man/man8/zerotier-one.8.gz
cat doc/zerotier-one.8 | gzip -9 >$(DESTDIR)/usr/share/man/man8/zerotier-one.8.gz

View File

@ -30,8 +30,11 @@ like conventional VPNs or VLANs. It can run on native systems, VMs, or
containers (Docker, OpenVZ, etc.).
%prep
rsync -a %{getenv:PWD}/* %{_builddir}
make clean
rm -rf *
ln -s %{getenv:PWD} %{name}-%{version}
tar --exclude=%{name}-%{version}/.git --exclude=%{name}-%{version}/%{name}-%{version} -czf %{_sourcedir}/%{name}-%{version}.tar.gz %{name}-%{version}/*
rm -f %{name}-%{version}
cp -a %{getenv:PWD}/* .
%build
make ZT_USE_MINIUPNPC=1 %{?_smp_mflags}
@ -45,10 +48,22 @@ cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
%files
%{_sbindir}/*
%{_bindir}/*
%{_mandir}/*
%{_localstatedir}/*
%{_unitdir}/%{name}.service
%doc AUTHORS.md README.md
%license LICENSE.GPL-3
%post
%systemd_post apache-httpd.service
%preun
%systemd_preun apache-httpd.service
%postun
%systemd_postun_with_restart apache-httpd.service
%changelog
* Wed Jun 08 2016 François Kooman <fkooman@tuxed.net> - 1.1.5-0.3
- include systemd unit file