]> git.pld-linux.org Git - packages/OpenIPMI.git/blobdiff - OpenIPMI.spec
- rel 2
[packages/OpenIPMI.git] / OpenIPMI.spec
index 0137f72475aedbd786409698874cece5af17f016..6843434ae9673fcb34e2249ca6fddded5979559e 100644 (file)
@@ -1,16 +1,27 @@
+# TODO
+# - bad BR (version mismatch):
+#  File "_mc_user.py", line 240, in ?
+#    class MCUsers(gui_treelist.TreeList): AttributeError: 'module' object has no attribute 'TreeList'
+#  make[4]: *** [_entity.pyc] Error 1
+#
+# Conditional build:
+%bcond_without gui     # don't build tkinter-based GUI
+#
 Summary:       IPMI abstraction layer
 Summary(pl):   Warstwa abstrakcji IPMI
 Name:          OpenIPMI
-Version:       1.4.12
-Release:       1
+Version:       2.0.10
+Release:       2
 License:       LGPL (library), GPL (ipmicmd)
 Group:         Libraries
 Source0:       http://dl.sourceforge.net/openipmi/%{name}-%{version}.tar.gz
-# Source0-md5: 5df8e7ba28f020eafc175b1624c8d837
+# Source0-md5: 8f5c200c5f25c33250567eaeb685e8c0
 Patch0:                %{name}-link.patch
+Patch1:                %{name}-python.patch
 URL:           http://openipmi.sourceforge.net/
 BuildRequires: autoconf
 BuildRequires: automake
+BuildRequires: gcc >= 5:3.2
 BuildRequires: gdbm-devel
 BuildRequires: glib2-devel >= 2.0
 BuildRequires: libtool >= 1:1.4.2-9
@@ -19,6 +30,12 @@ BuildRequires:       net-snmp-devel
 BuildRequires: perl-devel
 BuildRequires: pkgconfig
 BuildRequires: popt-devel
+BuildRequires: python-devel
+%{?with_gui:BuildRequires:     python-tkinter}
+BuildRequires: tcl-devel
+BuildRequires: rpm-pythonprov
+BuildRequires: swig-perl >= 1.3.25
+BuildRequires: swig-python >= 1.3.25
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -68,9 +85,36 @@ Perl interface to OpenIPMI.
 %description -n perl-%{name} -l pl
 Perlowy interfejs do OpenIPMI.
 
+%package -n python-%{name}
+Summary:       Python interface to OpenIPMI
+Summary(pl):   Pythonowy interfejs do OpenIPMI
+Group:         Development/Languages/Python
+Requires:      %{name} = %{version}-%{release}
+%pyrequires_eq python-libs
+
+%description -n python-%{name}
+Python interface to OpenIPMI.
+
+%description -n perl-%{name} -l pl
+Pythonowy interfejs do OpenIPMI.
+
+%package gui
+Summary:       OpenIPMI GUI
+Summary(pl):   Graficzny interfejs u¿ytkownika do OpenIPMI
+Group:         X11/Applications
+Requires:      python-%{name} = %{version}-%{release}
+Requires:      python-tkinter
+
+%description gui
+OpenIPMI GUI.
+
+%description gui -l pl
+Graficzny interfejs u¿ytkownika do OpenIPMI.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -78,14 +122,21 @@ Perlowy interfejs do OpenIPMI.
 %{__autoconf}
 %{__automake}
 CPPFLAGS="-I/usr/include/ncurses"
-%configure
-%{__make}
+%configure \
+       --without-glib12 \
+       %{!?with_gui:--without-tkinter}
+%{__make} \
+       PYTHON_INSTALL_DIR=%{py_sitedir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+%{__make} install -j1 \
+       DESTDIR=$RPM_BUILD_ROOT \
+       PYTHON_INSTALL_DIR=%{py_sitedir}
+
+rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{py,la,a} \
+       $RPM_BUILD_ROOT%{py_sitedir}/openipmigui/*.py
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -96,7 +147,11 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog FAQ README* TODO
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/ipmi*
+%attr(755,root,root) %{_bindir}/openipmicmd
+%attr(755,root,root) %{_bindir}/openipmish
+%attr(755,root,root) %{_bindir}/rmcp_ping
+%attr(755,root,root) %{_bindir}/solterm
 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
 %{_mandir}/man[178]/*
 
@@ -116,3 +171,17 @@ rm -rf $RPM_BUILD_ROOT
 %{perl_vendorarch}/OpenIPMI.pm
 %dir %{perl_vendorarch}/auto/OpenIPMI
 %attr(755,root,root) %{perl_vendorarch}/auto/OpenIPMI/OpenIPMI.so
+
+%files -n python-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_OpenIPMI.so
+%{py_sitedir}/OpenIPMI.py[co]
+
+%if %{with gui}
+%files gui
+%defattr(644,root,root,755)
+%doc swig/python/openipmigui/TODO
+%attr(755,root,root) %{_bindir}/openipmigui
+%dir %{py_sitedir}/openipmigui
+%{py_sitedir}/openipmigui/*.py[co]
+%endif
This page took 0.383921 seconds and 4 git commands to generate.