Skip to content

Commit

Permalink
Simpler tarball building
Browse files Browse the repository at this point in the history
Use packaging_rake_tasks.gem like YaST does.

Moved files for RPM building to package/ dir.
  • Loading branch information
mvidner committed Aug 27, 2015
1 parent e7fcc3e commit e06c422
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 39 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -107,5 +107,3 @@ tmp
# Subversion
.svn/

# OBS commit
package/
File renamed without changes.
79 changes: 79 additions & 0 deletions package/libyui-ncurses-doc.spec
@@ -0,0 +1,79 @@
#
# spec file for package libyui-ncurses-doc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name: libyui-ncurses-doc
Version: 2.47.2
Release: 0
Source: libyui-ncurses-%{version}.tar.bz2

BuildArch: noarch

BuildRequires: cmake >= 2.8
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: graphviz-gnome
BuildRequires: libyui-devel >= 3.0.4
BuildRequires: texlive-latex

Url: http://github.com/libyui/
Summary: Libyui-ncurses documentation
License: LGPL-2.1 or LGPL-3.0
Group: Documentation/HTML

%description
This package contains the character based (ncurses) user interface
component for libYUI.


This package provides the documentation. (HTML & PDF)


%prep

%setup -n libyui-ncurses-%{version}

%build

export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"

./bootstrap.sh %{_prefix}

mkdir build
cd build
cmake .. \
-DDOC_DIR=%{_docdir} \
-DDOCS_ONLY=ON

make %{?jobs:-j%jobs} docs

%install
cd build
make install DESTDIR="$RPM_BUILD_ROOT"

%fdupes -s $RPM_BUILD_ROOT/%_docdir/libyui-ncurses7

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc %{_docdir}/libyui-ncurses7

%changelog
File renamed without changes.
80 changes: 43 additions & 37 deletions libyui-ncurses.spec.in → package/libyui-ncurses.spec
@@ -1,7 +1,7 @@
#
# spec file for package @PROJECTNAME@
# spec file for package libyui-ncurses
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -16,10 +16,10 @@
#


Name: @PROJECTNAME@
Version: @VERSION@
Name: libyui-ncurses
Version: 2.47.2
Release: 0
Source: @PROJECTNAME@-%{version}.tar.bz2
Source: libyui-ncurses-%{version}.tar.bz2

BuildRequires: boost-devel
BuildRequires: cmake >= 2.8
Expand All @@ -30,29 +30,33 @@ BuildRequires: pkg-config
BuildRequires: %{libyui_devel_version}
BuildRequires: ncurses-devel

Url: @URL@
Summary: @SUMMARY@
Url: http://github.com/libyui/
Summary: Libyui - Character Based User Interface
License: LGPL-2.1 or LGPL-3.0
Group: System/Libraries

%description
@DESCRIPTION@
This package contains the character based (ncurses) user interface
component for libYUI.

%package -n @PROJECTNAME@@SONAME_MAJOR@

%package -n libyui-ncurses7

Requires: glibc-locale
Requires: lib@BASELIB@@SONAME_MAJOR@
Provides: lib@BASELIB@-ncurses = %{version}
Requires: libyui7
Provides: libyui-ncurses = %{version}
Provides: yast2-ncurses = 2.42.0
Obsoletes: yast2-ncurses < 2.42.0
Provides: yui_backend = @SONAME_MAJOR@
Provides: yui_backend = 7

Url: @URL@
Summary: @SUMMARY@
Url: http://github.com/libyui/
Summary: Libyui - Character Based User Interface
Group: System/Libraries

%description -n @PROJECTNAME@@SONAME_MAJOR@
@DESCRIPTION@
%description -n libyui-ncurses7
This package contains the character based (ncurses) user interface
component for libYUI.



%package devel
Expand All @@ -61,22 +65,24 @@ Requires: %{libyui_devel_version}
Requires: boost-devel
Requires: glibc-devel
Requires: libstdc++-devel
Requires: @PROJECTNAME@@SONAME_MAJOR@ = %{version}
Requires: libyui-ncurses7 = %{version}
Requires: ncurses-devel

Url: @URL@
Summary: @PROJECTNAME_UC@ header files
Url: http://github.com/libyui/
Summary: Libyui-ncurses header files
Group: Development/Languages/C and C++

%description devel
@DESCRIPTION@
This package contains the character based (ncurses) user interface
component for libYUI.


This can be used independently of YaST for generic (C++) applications.
This package has very few dependencies.


%prep
%setup -q -n @PROJECTNAME@-%{version}
%setup -q -n libyui-ncurses-%{version}

%build

Expand Down Expand Up @@ -107,32 +113,32 @@ make %{?jobs:-j%jobs}
%install
cd build
make install DESTDIR="$RPM_BUILD_ROOT"
install -m0755 -d $RPM_BUILD_ROOT/%{_docdir}/@PROJECTNAME@@SONAME_MAJOR@/
install -m0755 -d $RPM_BUILD_ROOT/%{_libdir}/@BASELIB@
install -m0644 ../COPYING* $RPM_BUILD_ROOT/%{_docdir}/@PROJECTNAME@@SONAME_MAJOR@/
install -m0755 -d $RPM_BUILD_ROOT/%{_docdir}/libyui-ncurses7/
install -m0755 -d $RPM_BUILD_ROOT/%{_libdir}/yui
install -m0644 ../COPYING* $RPM_BUILD_ROOT/%{_docdir}/libyui-ncurses7/

%clean
rm -rf "$RPM_BUILD_ROOT"

%post -n @PROJECTNAME@@SONAME_MAJOR@ -p /sbin/ldconfig
%post -n libyui-ncurses7 -p /sbin/ldconfig

%postun -n @PROJECTNAME@@SONAME_MAJOR@ -p /sbin/ldconfig
%postun -n libyui-ncurses7 -p /sbin/ldconfig

%files -n @PROJECTNAME@@SONAME_MAJOR@
%files -n libyui-ncurses7
%defattr(-,root,root)
%{_bindir}/libyui-terminal
%dir %{_libdir}/@BASELIB@
%{_libdir}/@BASELIB@/lib*.so.*
%doc %dir %{_docdir}/@PROJECTNAME@@SONAME_MAJOR@
%doc %{_docdir}/@PROJECTNAME@@SONAME_MAJOR@/COPYING*
%dir %{_libdir}/yui
%{_libdir}/yui/lib*.so.*
%doc %dir %{_docdir}/libyui-ncurses7
%doc %{_docdir}/libyui-ncurses7/COPYING*

%files devel
%defattr(-,root,root)
%dir %{_docdir}/@PROJECTNAME@@SONAME_MAJOR@
%{_libdir}/@BASELIB@/lib*.so
%{_prefix}/include/@BASELIB@
%{_libdir}/pkgconfig/@PROJECTNAME@.pc
%{_libdir}/cmake/@PROJECTNAME@
%{_datadir}/lib@BASELIB@
%dir %{_docdir}/libyui-ncurses7
%{_libdir}/yui/lib*.so
%{_prefix}/include/yui
%{_libdir}/pkgconfig/libyui-ncurses.pc
%{_libdir}/cmake/libyui-ncurses
%{_datadir}/libyui

%changelog

0 comments on commit e06c422

Please sign in to comment.