grim/libgnt

initial stab at a spec file
draft release-2.x.y
2019-05-24, Gary Kramlich
29418c866c4b
Parents 0ed43e4e8a74
Children
initial stab at a spec file
--- a/meson.build Mon Jun 03 01:57:51 2019 -0400
+++ b/meson.build Fri May 24 04:34:41 2019 -0500
@@ -43,6 +43,7 @@
gnt_micro_version = parts[2]
gnt_config = configuration_data()
+gnt_config.set('GNT_SOVERSION', gnt_soversion)
gnt_config.set('GNT_MAJOR_VERSION', gnt_major_version)
gnt_config.set('GNT_MINOR_VERSION', gnt_minor_version)
gnt_config.set('GNT_MICRO_VERSION', gnt_micro_version)
@@ -232,3 +233,5 @@
subdir('wms')
subdir('test')
subdir('doc')
+subdir('packaging')
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/gnt.spec.in Fri May 24 04:34:41 2019 -0500
@@ -0,0 +1,99 @@
+Name: gnt
+Version: @GNT_MAJOR_VERSION@.@GNT_MINOR_VERSION@.@GNT_MICRO_VERSION@
+%if @GNT_EXTRA_VERSION@ == ""
+Release: 1.%{?build_number}%{?!build_number:1}%{?dist}
+%else
+Release: 0.%{?build_number}%{?!build_number:1}%{?dist}
+%endif
+License: GPL-2.0+
+Summary: An ncurses toolkit for creating text-mode guis
+Url: https://bitbucket.org/pidgin/libgnt
+Group: Development/Libraries
+
+BuildRequires: gettext
+BuildRequires: glib2-devel >= 2.20.0
+BuildRequires: gobject-introspection-devel
+BuildRequires: gtk-doc
+BuildRequires: meson >= 0.37.0
+BuildRequires: ncurses-devel
+
+%if 0%{?suse_version} > 0
+# avoid "directories not owned by a package" error
+%define notownedhack 1
+%else
+%define notownedhack 0
+%endif
+
+%package devel
+Summary: An ncurses toolkit for creating text-mode guis
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description
+GNT is an ncurses toolkit for creating text-mode graphical user interfaces in a
+fast and easy way.
+
+This package contains the main library.
+
+%description devel
+GNT is an ncurses toolkit for creating text-mode graphical user interfaces in a
+fast and easy way.
+
+This package includes the files used for development against libgnt
+
+%build
+mkdir -p build
+pushd build
+
+CFLAGS="%{optflags}" meson \
+ --prefix=%{_prefix} \
+ ..
+
+ninja %{?_smp_mflags}
+
+
+%install
+pushd build
+
+DESTDIR=%{buildroot} ninja install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root)
+%doc README.md ChangeLog
+%if %{notownedhack} == 0
+%license COPYING
+%endif
+%{_libdir}/libgnt.so.*
+
+%files devel
+%defattr(-,root,root)
+%doc README.md
+%if %{notownedhack} == 0
+%license COPYING
+%endif
+%if @GNT_MAJOR_VERSION@ >= 3
+%{_includedir}/gnt@GNT_MAJOR_VERSION@/
+%{_libdir}/libgnt.so
+%{_libdir}/libgnt.so.@GNT_SOVERSION@.@GNT_MINOR_VERSION@.@GNT_MICRO_VERSION@
+%{_libdir}/pkgconfig/gnt@GNT_MAJOR_VERSION@.pc
+%{_libdir}/girepository-1.0/Gnt-0.0.typelib
+%{_libdir}/gnt@GNT_MAJOR_VERSION@/*.so
+%{_datadir}/gir-1.0/Gnt-0.0.gir
+%{_datadir}/gtk-doc/html/gnt@GNT_MAJOR_VERSION@/
+%else
+%{_includedir}/gnt/
+%{_libdir}/libgnt.so
+%{_libdir}/libgnt.so.@GNT_SOVERSION@.@GNT_MINOR_VERSION@.@GNT_MICRO_VERSION@
+%{_libdir}/pkgconfig/gnt.pc
+%{_libdir}/gnt/*.so
+%{_datadir}/gtk-doc/html/libgnt/
+%endif
+
+%changelog
+* Fri May 24 2019 Gary Kramlich <grim@reaperworld.com>
+- Initial revision
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/meson.build Fri May 24 04:34:41 2019 -0500
@@ -0,0 +1,4 @@
+configure_file(
+ input : 'gnt.spec.in',
+ output : 'gnt.spec',
+ configuration : gnt_config)