summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2015-11-27 21:24:37 +0100
committerpgen <p.gen.progs@gmail.com>2015-11-28 00:29:50 +0100
commitcb76557d32c5bf232f752cbd82ce06f07921c6dc (patch)
tree98bf6ff78ac07b5c96f113812053e16e221f771c
parent2661fa86d60d0cbb13b35f4ce545b72b9967e27e (diff)
Add a RPM spec file template
-rw-r--r--Makefile.am1
-rw-r--r--Makefile.in9
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac3
-rw-r--r--smenu.spec.in64
5 files changed, 75 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 0c4c533..ab77b1f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
bin_PROGRAMS = smenu
smenu_SOURCES = smenu.c smenu.h
dist_man_MANS = smenu.1
+EXTRA_DIST = smenu.spec.in smenu.spec build.sh COPYRIGHT INTERNALS.rst LICENSE.rst README.rst
diff --git a/Makefile.in b/Makefile.in
index 20bc663..504eb6b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -80,8 +80,8 @@ bin_PROGRAMS = smenu$(EXEEXT)
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.h.in depcomp $(dist_man_MANS) TODO install-sh \
- missing
+ $(srcdir)/config.h.in $(srcdir)/smenu.spec.in depcomp \
+ $(dist_man_MANS) TODO install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -90,7 +90,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = smenu.spec
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
@@ -291,6 +291,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
smenu_SOURCES = smenu.c smenu.h
dist_man_MANS = smenu.1
+EXTRA_DIST = smenu.spec.in smenu.spec build.sh COPYRIGHT INTERNALS.rst LICENSE.rst README.rst
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -345,6 +346,8 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+smenu.spec: $(top_builddir)/config.status $(srcdir)/smenu.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
diff --git a/configure b/configure
index 56824f4..81f06a2 100755
--- a/configure
+++ b/configure
@@ -4872,6 +4872,8 @@ done
ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files smenu.spec"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -5600,6 +5602,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "smenu.spec") CONFIG_FILES="$CONFIG_FILES smenu.spec" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -6326,4 +6329,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
diff --git a/configure.ac b/configure.ac
index b6fa081..96cd798 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,5 +36,4 @@ AC_FUNC_MALLOC
AC_CHECK_FUNCS([mblen memset nl_langinfo pathconf regcomp setlocale strchr strdup strrchr])
AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-
+AC_OUTPUT([smenu.spec])
diff --git a/smenu.spec.in b/smenu.spec.in
new file mode 100644
index 0000000..7ed7dc1
--- /dev/null
+++ b/smenu.spec.in
@@ -0,0 +1,64 @@
+#
+# spec file for package smenu
+#
+# 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: smenu
+Version: @VERSION@
+Release: 0
+Summary: A standard input word picker
+License: GPL-2.0
+Group: Productivity/Text/Utilities
+Url: http://repo.or.cz/smenu.git
+Source: %{name}-%{version}.tar.gz
+BuildRequires: ncurses-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%description
+This simple tool reads words from the standard input, presents them in
+a cool interactive window after the current line on the terminal and writes
+the selected word, if any, on the standard output.
+
+After having unsuccessfully searched the NET for what I wanted, I
+decided to try to write my own.
+
+I have tried hard to made its usage as simple as possible. It should
+work, even when using an old "vt100" terminal and is "UTF-8" aware.
+
+Author: Pierre Gentile <p.gen.progs@gmail.com>
+
+%prep
+%setup -q
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
+install -d %{buildroot}%{_defaultdocdir}/%{name}
+for FILE in COPYRIGHT *.rst; do
+ mv ${FILE} %{buildroot}%{_defaultdocdir}/%{name}
+done
+
+%files
+%defattr(-,root,root,-)
+%attr(0755,root,root) %{_bindir}/*
+%dir %{_defaultdocdir}/%{name}
+%doc %{_defaultdocdir}/%{name}/*
+%{_mandir}/man1/*
+
+%changelog