Home | History | Annotate | Download | only in config
      1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
      2 ## Configure input file for elfutils.
      3 ##
      4 ## Copyright (C) 2004, 2005, 2008 Red Hat, Inc.
      5 ## This file is part of Red Hat elfutils.
      6 ##
      7 ## Red Hat elfutils is free software; you can redistribute it and/or modify
      8 ## it under the terms of the GNU General Public License as published by the
      9 ## Free Software Foundation; version 2 of the License.
     10 ##
     11 ## Red Hat elfutils is distributed in the hope that it will be useful, but
     12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
     13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14 ## General Public License for more details.
     15 ##
     16 ## You should have received a copy of the GNU General Public License along
     17 ## with Red Hat elfutils; if not, write to the Free Software Foundation,
     18 ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
     19 ##
     20 ## Red Hat elfutils is an included package of the Open Invention Network.
     21 ## An included package of the Open Invention Network is a package for which
     22 ## Open Invention Network licensees cross-license their patents.  No patent
     23 ## license is granted, either expressly or impliedly, by designation as an
     24 ## included package.  Should you wish to participate in the Open Invention
     25 ## Network licensing program, please visit www.openinventionnetwork.com
     26 ## <http://www.openinventionnetwork.com>.
     27 ##
     28 EXTRA_DIST = elfutils.spec.in
     29 
     30 if MAINTAINER_MODE
     31 $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS
     32 	@tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \
     33 	date +'* %a %b %e %Y' | tr '[\n]' '[ ]' > $$tmpname; \
     34 	getent passwd "$$(whoami)" | \
     35 	  awk 'BEGIN {FS=":"} { printf $$5; exit 0}' >> $$tmpname; \
     36 	echo -n " <$$(whoami)@redhat.com> " >> $$tmpname; \
     37 	awk '\
     38 	  $$1 == "Version" && started { exit } \
     39 	  $$1 == "Version" { started=1; line=""; sub(/:/,"",$$2); \
     40 			     print $$2 "-1"; next } \
     41 	  NF > 0 { line = (line != "") ? (line " " $$0) : ("- " $$0) } \
     42 	  NF == 0 && line != "" { print line; line="" } \
     43 	  END { if (line != "") print line; print "" }' $< \
     44 	| fold -s -w 70 | sed '1!s/^[^-]/  &/' >> $$tmpname; \
     45 	sed "/^%changelog/r $$tmpname" $@ > $@.new; \
     46 	rm -f $$tmpname; \
     47 	mv -f $@.new $@
     48 endif
     49