[python-nwdiag] Initial import (#1072064)

Dridi Boukelmoune dridi at fedoraproject.org
Fri Mar 7 16:29:26 UTC 2014


commit ef6e0b7585762fdd625d2403eef6376ab962044b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Mar 7 17:24:35 2014 +0100

    Initial import (#1072064)

 .gitignore             |    1 +
 description-nwdiag.txt |   15 ++++++
 python-nwdiag.spec     |  120 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 4 files changed, 137 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f1ce3d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/1.0.0.tar.gz
diff --git a/description-nwdiag.txt b/description-nwdiag.txt
new file mode 100644
index 0000000..37fe818
--- /dev/null
+++ b/description-nwdiag.txt
@@ -0,0 +1,15 @@
+nwdiag and its family generate diagram images from simply text file.
+
+Features:
+- Generates beautiful diagram images from simple text format (similar to
+  graphviz’s DOT format)
+- Layouts diagram elements automatically
+- Embeds to many documentations; Sphinx, Trac, Redmine and some wikis
+
+- Supports many types of diagrams
+  - logical network diagram (with this package)
+  - block diagram (with the blockdiag package)
+  - sequence diagram (with the seqdiag package)
+  - activity diagram (with the actdiag package)
+
+Enjoy documentation with nwdiag !
diff --git a/python-nwdiag.spec b/python-nwdiag.spec
new file mode 100644
index 0000000..834edf6
--- /dev/null
+++ b/python-nwdiag.spec
@@ -0,0 +1,120 @@
+%global owner       tk0miya
+%global srcname     nwdiag
+%global tag         %{version}
+%global commit      8e6ff6bf2dd1279f863f19ca27d7e35ad0393f6a
+%global shortcommit %(c=%{commit}; echo ${c:0:12})
+
+Name:           python-%{srcname}
+Version:        1.0.0
+Release:        2%{?dist}
+Summary:        nwdiag generates network-diagram images from text
+
+License:        ASL 2.0
+URL:            http://blockdiag.com/
+Source0:        https://bitbucket.org/%{owner}/%{srcname}/get/%{tag}.tar.gz
+Source1:        description-%{srcname}.txt
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  python-blockdiag-devel
+BuildRequires:  python-docutils
+BuildRequires:  python-nose
+BuildRequires:  python-pep8
+BuildRequires:  python-pillow
+BuildRequires:  python-setuptools
+
+BuildRequires:  python3-blockdiag-devel
+BuildRequires:  python3-devel
+BuildRequires:  python3-docutils
+BuildRequires:  python3-nose
+BuildRequires:  python3-pep8
+BuildRequires:  python3-pillow
+BuildRequires:  python3-setuptools
+
+Requires:       python-blockdiag
+
+
+%description
+%(cat %{SOURCE1})
+
+
+%package -n python3-%{srcname}
+Summary:        %{summary}
+Requires:       python3-blockdiag
+
+
+%description -n python3-%{srcname}
+%(cat %{SOURCE1})
+
+This package installs the %{srcname} module for Python 3.
+
+
+%prep
+%setup -qn %{owner}-%{srcname}-%{shortcommit}
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+find           -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
+
+
+%build
+%{__python2} setup.py build
+
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+
+
+%install
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+mv %{buildroot}%{_bindir}/%{srcname} %{buildroot}%{_bindir}/%{srcname}-%{python3_version}
+mv %{buildroot}%{_bindir}/packetdiag %{buildroot}%{_bindir}/packetdiag-%{python3_version}
+mv %{buildroot}%{_bindir}/rackdiag   %{buildroot}%{_bindir}/rackdiag-%{python3_version}
+install -m 0644 -D %{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}-%{python3_version}.1
+install -m 0644 -D packetdiag.1 %{buildroot}%{_mandir}/man1/packetdiag-%{python3_version}.1
+install -m 0644 -D rackdiag.1   %{buildroot}%{_mandir}/man1/rackdiag-%{python3_version}.1
+popd
+
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+install -m 0644 -D %{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1
+install -m 0644 -D packetdiag.1 %{buildroot}%{_mandir}/man1/packetdiag.1
+install -m 0644 -D rackdiag.1   %{buildroot}%{_mandir}/man1/rackdiag.1
+
+
+%check
+%{__python} setup.py test
+
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+
+
+%files
+%doc LICENSE
+%{_bindir}/*diag
+%{_mandir}/man1/*diag.1*
+%{python2_sitelib}/*
+%exclude %{python2_sitelib}/*/tests
+
+
+%files -n python3-%{srcname}
+%{_pkgdocdir}
+%{_bindir}/*-%{python3_version}
+%{_mandir}/man1/*-%{python3_version}.1*
+%{python3_sitelib}/__pycache__/*
+%{python3_sitelib}/*diag*
+%exclude %{python3_sitelib}/*/tests
+
+
+%changelog
+* Tue Mar 04 2014 Dridi Boukelmoune <dridi.boukelmoune at gmail.com> - 1.0.0-2
+- Fixed changelog format.
+- Fixed man page permissions.
+- Added missing man pages.
+- Avoid co-ownership of %%{python3_sitelib}/__pycache__/.
+
+* Sun Mar 02 2014 Dridi Boukelmoune <dridi.boukelmoune at gmail.com> - 1.0.0-1
+- Initial version.
diff --git a/sources b/sources
index e69de29..6a05fd1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7cb8e8463b989896f6f710e94cf4d3fb  1.0.0.tar.gz


More information about the scm-commits mailing list