mirror of
https://github.com/Rudd-O/qubes-network-server.git
synced 2025-06-06 18:08:33 +02:00
Restructure as proper component for qubes-builder
Also bumps version to 0.0.7. No intentional functional change.
This commit is contained in:
parent
3847a37456
commit
e473e5e10c
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
|
rpm/
|
||||||
|
pkgs/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.pyo
|
||||||
*~
|
*~
|
||||||
*.tar.gz
|
.*.swp
|
||||||
*.rpm
|
|
||||||
|
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
|||||||
BINDIR=/usr/bin
|
|
||||||
LIBDIR=/usr/lib64
|
|
||||||
DESTDIR=
|
|
||||||
|
|
||||||
clean:
|
|
||||||
find -name '*.pyc' -o -name '*~' -print0 | xargs -0 rm -f
|
|
||||||
rm -f *.tar.gz *.rpm
|
|
||||||
|
|
||||||
dist: clean
|
|
||||||
DIR=qubes-network-server-`awk '/^Version:/ {print $$2}' qubes-network-server.spec` && FILENAME=$$DIR.tar.gz && tar czf "$$FILENAME" --exclude "$$FILENAME" --exclude .git --exclude .gitignore -X .gitignore --transform="s|^|$$DIR/|" --show-transformed *
|
|
||||||
|
|
||||||
rpm: dist
|
|
||||||
@which rpmbuild || { echo 'rpmbuild is not available. Please install the rpm-build package with the command `dnf install rpmbuild` to continue, then rerun this step.' ; exit 1 ; }
|
|
||||||
T=`mktemp -d` && rpmbuild --define "_topdir $$T" -ta qubes-network-server-`awk '/^Version:/ {print $$2}' qubes-network-server.spec`.tar.gz || { rm -rf "$$T"; exit 1; } && mv "$$T"/RPMS/*/* "$$T"/SRPMS/* . || { rm -rf "$$T"; exit 1; } && rm -rf "$$T"
|
|
||||||
|
|
||||||
srpm: dist
|
|
||||||
T=`mktemp -d` && rpmbuild --define "_topdir $$T" -ts qubes-network-server-`awk '/^Version:/ {print $$2}' qubes-network-server.spec`.tar.gz || { rm -rf "$$T"; exit 1; } && mv "$$T"/SRPMS/* . || { rm -rf "$$T"; exit 1; } && rm -rf "$$T"
|
|
||||||
|
|
||||||
install:
|
|
||||||
install -Dm 755 src/usr/bin/qvm-static-ip -t $(DESTDIR)/$(BINDIR)/
|
|
||||||
install -Dm 644 src/usr/lib64/python2.7/site-packages/qubes/modules/*.py -t $(DESTDIR)/$(LIBDIR)/python2.7/site-packages/qubes/modules
|
|
3
Makefile.builder
Normal file
3
Makefile.builder
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ifeq ($(PACKAGE_SET),dom0)
|
||||||
|
RPM_SPEC_FILES=network-server.spec
|
||||||
|
endif
|
43
network-server.spec
Normal file
43
network-server.spec
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
|
|
||||||
|
%{!?version: %define version %(cat version)}
|
||||||
|
|
||||||
|
Name: qubes-network-server
|
||||||
|
Version: %{version}
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Turn your Qubes OS into a network server
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
URL: https://github.com/Rudd-O/qubes-network-server
|
||||||
|
|
||||||
|
Requires: qubes-core-dom0
|
||||||
|
|
||||||
|
%define _builddir %(pwd)
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package lets you turn your Qubes OS into a network server.
|
||||||
|
|
||||||
|
%build
|
||||||
|
python -m compileall plugin
|
||||||
|
python -O -m compileall plugin
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{python_sitearch}/qubes/modules
|
||||||
|
cp plugin/*.py* $RPM_BUILD_ROOT%{python_sitearch}/qubes/modules
|
||||||
|
install -D qvm-static-ip $RPM_BUILD_ROOT%{_bindir}/qvm-static-ip
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
rm -f plugin/*.py[co]
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(0644, root, root, -)
|
||||||
|
%{python_sitearch}/qubes/modules/001FortressQubesVm.py*
|
||||||
|
%{python_sitearch}/qubes/modules/006FortressQubesNetVm.py*
|
||||||
|
%{python_sitearch}/qubes/modules/007FortressQubesProxyVm.py*
|
||||||
|
%attr(0755, -, -) %{_bindir}/qvm-static-ip
|
||||||
|
%doc README.md TODO
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Oct 11 2016 Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
|
||||||
|
- Initial release
|
@ -1,45 +0,0 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
|
|
||||||
%define mybuildnumber %{?build_number}%{?!build_number:1}
|
|
||||||
|
|
||||||
Name: qubes-network-server
|
|
||||||
Version: 0.0.6
|
|
||||||
Release: %{mybuildnumber}%{?dist}
|
|
||||||
Summary: Turn your Qubes OS into a network server
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
License: GPLv3+
|
|
||||||
URL: https://github.com/Rudd-O/qubes-network-server
|
|
||||||
Source0: https://github.com/Rudd-O/%{name}/archive/{%version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: coreutils
|
|
||||||
BuildRequires: tar
|
|
||||||
BuildRequires: gawk
|
|
||||||
BuildRequires: findutils
|
|
||||||
|
|
||||||
Requires: qubes-core-dom0
|
|
||||||
|
|
||||||
%description
|
|
||||||
This package lets you turn your Qubes OS into a network server.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
|
||||||
# variables must be kept in sync with install
|
|
||||||
make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} LIBDIR=%{_libdir}
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
# variables must be kept in sync with build
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} LIBDIR=%{_libdir}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%attr(0755, root, root) %{_bindir}/qvm-static-ip
|
|
||||||
%attr(0644, root, root) %{_libdir}/python2.7/site-packages/qubes/modules/*.py*
|
|
||||||
%doc README.md TODO
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Tue Oct 11 2016 Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
|
|
||||||
- Initial release
|
|
Loading…
x
Reference in New Issue
Block a user