[libyui] Initial import (#959926)

besser82 besser82 at fedoraproject.org
Wed May 15 19:06:37 UTC 2013


commit cbe58666a0e0714b34c9ded83c5bb2f8abf23101
Author: Björn Esser <bjoern.esser at gmail.com>
Date:   Wed May 15 21:06:23 2013 +0200

    Initial import (#959926)

 .gitignore                        |    1 +
 libyui.spec                       |  163 +++++++++++++++++++++++++++++++++++++
 libyui_honor_compiler_flags.patch |   15 ++++
 libyui_skip_doxygen_latex.patch   |   34 ++++++++
 sources                           |    1 +
 5 files changed, 214 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7b16a90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libyui-3.0.4-37f6bc2.tar.gz
diff --git a/libyui.spec b/libyui.spec
new file mode 100644
index 0000000..576f7c1
--- /dev/null
+++ b/libyui.spec
@@ -0,0 +1,163 @@
+%global commit 37f6bc2dbb1b525f7eabc71f43ae3949f0671be6
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global libsuffix yui
+
+%global _hardened_build 1
+
+
+Name:		lib%{libsuffix}
+Version:	3.0.4
+Release:	1%{?dist}
+License:	LGPLv2 or LGPLv3
+Source0:	https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+
+# both will be commited and merged with https://github.com/libyui/libyui/pull/47
+Patch0:		libyui_honor_compiler_flags.patch
+Patch1:		libyui_skip_doxygen_latex.patch
+
+Group:		System Environment/Libraries
+
+BuildRequires:	boost-devel
+BuildRequires:	cmake >= 2.8
+BuildRequires:	doxygen
+BuildRequires:	fdupes
+BuildRequires:	graphviz
+BuildRequires:	pkgconfig
+
+URL:		https://github.com/%{name}/%{name}/
+Summary:	GUI-abstraction library
+
+
+%description
+This is the user interface engine that provides the abstraction from
+graphical user interfaces (Qt, Gtk) and text based user interfaces
+(ncurses).
+
+Originally developed for YaST, %{name} can now be used independently of
+YaST for generic (C++) applications.
+
+%{name} has very few dependencies.
+
+
+%package devel
+
+Group:		Development/Libraries
+
+Requires:	boost-devel%{?_isa}
+Requires:	cmake%{?_isa}
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+Summary:	Files needed for developing with %{name}
+
+
+%description devel
+%{name} can be used independently of YaST for generic (C++) applications
+and has very few dependencies.
+
+%package doc
+
+Group:		Documentation
+
+BuildArch:	noarch
+
+Summary:	Documentation files for %{name}
+
+
+%description doc
+This package includes the developer's documentation as HTML and some
+brief examples how to build a UI using %{name}.
+
+
+%prep
+%setup -q -n %{name}-%{commit}
+
+%patch0
+%patch1
+
+./bootstrap.sh
+
+%build
+mkdir -p build
+cd build
+
+%cmake ..\
+	-DPREFIX=%{_prefix} \
+	-DLIB_DIR=%{_libdir} \
+	-DDOC_DIR=%{_defaultdocdir} \
+	-DDOC_SUBDIR=%{name}-%{version} \
+	-DINSTALL_DOCS=ON \
+	-DSKIP_LATEX=ON \
+	-DCMAKE_BUILD_TYPE=RELEASE
+
+make %{?_smp_mflags}
+make %{?_smp_mflags} docs
+
+
+%install
+cd build
+
+%make_install
+
+install -m0755 -d %{buildroot}/%{_libdir}/%{libsuffix}
+install -m0755 -d %{buildroot}/%{_datadir}/%{name}/theme
+install -pm0644 ../COPYING* %{buildroot}/%{_defaultdocdir}/%{name}-%{version}
+install -pm0644 ../ChangeLog %{buildroot}/%{_defaultdocdir}/%{name}-%{version}
+
+%fdupes %{buildroot}/%{_defaultdocdir}/%{name}-%{version}
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%{_libdir}/lib*.so.*
+%dir %{_libdir}/%{libsuffix}
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/theme
+%dir %{_defaultdocdir}/%{name}-%{version}
+%doc %{_defaultdocdir}/%{name}-%{version}/C*
+
+
+%files devel
+%{_libdir}/lib*.so
+%{_includedir}/%{libsuffix}
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/cmake/%{name}
+%{_datadir}/%{name}/buildtools
+
+
+%files doc
+%dir %{_defaultdocdir}/%{name}-%{version}
+%doc %{_defaultdocdir}/%{name}-%{version}/*/
+
+%changelog
+* Wed May 15 2013 Björn Esser <bjoern.esser at gmail.com> - 3.0.4-1
+- new upstream version
+- add Patch1 to skip generation of pdf-docs if doxygen-latex is installed.
+- added needed bootstrap to prep
+
+* Tue May 14 2013 Björn Esser <bjoern.esser at gmail.com> - 3.0.3-3
+- removed macro from Patch0.
+- fixed typo -> s/pakage/package/
+- removed Provides/Requires: yui_ui
+
+* Mon May 13 2013 Björn Esser <bjoern.esser at gmail.com> - 3.0.3-2
+- fixup as suggested in https://bugzilla.redhat.com/show_bug.cgi?id=959926#c2
+- add Patch0 to obey conventions about the compiler flags set in the system
+  rpm configuration. See:
+  https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
+- fixup as suggested in https://bugzilla.redhat.com/show_bug.cgi?id=959926#c4
+- build a hardened version just in case
+- add Requires: %{libsuffix}-ui, because %{name} without UI-plugins is as
+  useful as a car without gas and tires.
+- add -devel Provides: %{libsuffix}-ui to provide a FAKE %{libsuffix}-ui to
+  satisfy dependencies during rpmbuild of the UI-plugins and made sure this
+  is known by documenting this in %{name}-devel description.
+- add -devel Requires: cmake to solve the /usr/lib*/cmake/ ownership-problem,
+  which is needed for libyui*-builds anyways.
+
+* Mon May 06 2013 Björn Esser <bjoern.esser at gmail.com> - 3.0.3-1
+- Initial RPM release.
diff --git a/libyui_honor_compiler_flags.patch b/libyui_honor_compiler_flags.patch
new file mode 100644
index 0000000..9bc1f9b
--- /dev/null
+++ b/libyui_honor_compiler_flags.patch
@@ -0,0 +1,15 @@
+diff --git a/buildtools/LibyuiCommon.cmake b/buildtools/LibyuiCommon.cmake
+index 726ab23..18453bc 100644
+--- buildtools/LibyuiCommon.cmake
++++ buildtools/LibyuiCommon.cmake
+@@ -109,8 +109,8 @@ MACRO( SET_BUILD_FLAGS )	# setup compiler-flags depending on CMAKE_BUILD_TYPE
+   SET( CMAKE_C_FLAGS_DEBUG 	"-O0 -g3" )
+   SET( CMAKE_CXX_FLAGS_MINSIZEREL	"-Os" )
+   SET( CMAKE_C_FLAGS_MINSIZEREL		"-Os" )
+-  SET( CMAKE_CXX_FLAGS_RELEASE	"-O3" )
+-  SET( CMAKE_C_FLAGS_RELEASE	"-O3" )
++  SET( CMAKE_CXX_FLAGS_RELEASE	"" )
++  SET( CMAKE_C_FLAGS_RELEASE	"" )
+   SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO	"-O3 -g3" )
+   SET( CMAKE_C_FLAGS_RELWITHDEBINFO	"-O3 -g3" )
+ 
diff --git a/libyui_skip_doxygen_latex.patch b/libyui_skip_doxygen_latex.patch
new file mode 100644
index 0000000..55efbd5
--- /dev/null
+++ b/libyui_skip_doxygen_latex.patch
@@ -0,0 +1,34 @@
+diff --git a/buildtools/LibyuiCommon.cmake b/buildtools/LibyuiCommon.cmake
+index 18453bc..c370bb1 100644
+--- buildtools/LibyuiCommon.cmake
++++ buildtools/LibyuiCommon.cmake
+@@ -41,6 +41,7 @@ MACRO( SET_OPTIONS )		# setup configurable options
+ 
+   OPTION( DISABLE_SHARED "Shall I build a static library, only?" OFF )
+   OPTION( DOCS_ONLY "Shall \"make install\" install only docs, no binaries?" OFF )
++  OPTION( SKIP_LATEX "Shall I skip the generation of LaTeX PDF-docs?" OFF )
+   OPTION( ENABLE_STATIC "Shall I build a static library, too?" OFF )
+   OPTION( ENABLE_DEBUG "Shall I include Debug-Symbols in Release?" OFF )
+   OPTION( ENABLE_EXAMPLES "Shall I compile the examples, too?" OFF )
+@@ -266,7 +267,7 @@ MACRO( SET_AUTODOCS )		# looks for doxygen, dot and latex and setup autodocs acc
+       AND NOT ${MAKEINDEX_COMPILER} STREQUAL "MAKEINDEX_COMPILER-NOTFOUND"
+     )
+ 
+-    IF( ${LATEX_COND} )
++    IF( ${LATEX_COND} AND NOT SKIP_LATEX )
+       MESSAGE( STATUS "Found LaTeX: ${PDFLATEX_COMPILER}" )
+       MESSAGE( STATUS "Found LaTeX: ${MAKEINDEX_COMPILER}" )
+       SET( BUILD_LATEX "YES" )
+@@ -286,10 +287,10 @@ MACRO( SET_AUTODOCS )		# looks for doxygen, dot and latex and setup autodocs acc
+         )
+       ENDIF( INSTALL_DOCS OR DOCS_ONLY )
+ 
+-    ELSE( ${LATEX_COND} )
++    ELSE( ${LATEX_COND} AND NOT SKIP_LATEX )
+       MESSAGE( STATUS "Checking for LaTeX: not found" )
+       SET( BUILD_LATEX "NO" )
+-    ENDIF( ${LATEX_COND} )
++    ENDIF( ${LATEX_COND} AND NOT SKIP_LATEX )
+ 
+     ADD_CUSTOM_TARGET( ${DOXYGEN_TARGET}
+       ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
diff --git a/sources b/sources
index e69de29..c9c96d3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6849ce6b7775acfa00170fd8fb065c2d  libyui-3.0.4-37f6bc2.tar.gz


More information about the scm-commits mailing list