sudo.man.in: $(srcdir)/sudo.pod
@rm -f $(srcdir)/$@
- ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ )
+ ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudo.man.pl >> $@ )
sudo.man: sudo.man.in
CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
sudoers.man.in: $(srcdir)/sudoers.pod
@rm -f $(srcdir)/$@
- ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ )
+ ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudoers.man.pl >> $@ )
sudoers.man:: sudoers.man.in
CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
+sudo (1.7.2p1-2) UNRELEASED; urgency=low
+
+ * working on substitution variables in man pages
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 20 Nov 2009 07:31:30 -0700
+
sudo (1.7.2p1-1) unstable; urgency=low
* new upstream version
--- /dev/null
+#!/usr/bin/perl -p
+
+BEGIN {
+ %tags = ( 'a', '@BAMAN@', 'c', '@LCMAN@', 'r', '@SEMAN@', 't', '@SEMAN@');
+ $t = undef;
+}
+if (/^\.IP(.*-([acrt]))?/) {
+ $t = $1 ? $tags{$2} : undef;
+} elsif (/-a.*auth_type/) {
+ $_ = $tags{'a'} . $_;
+} elsif (/(-c.*class.*\||login_cap)/) {
+ $_ = $tags{'c'} . $_;
+} elsif (/-r.*role.*-t.*type/) {
+ $_ = $tags{'r'} . $_;
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+
+# comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+ $_ = $t . $_;
+}
--- /dev/null
+#!/usr/bin/perl -p
+
+BEGIN {
+ $t = undef;
+}
+
+if (/^\./) {
+ if (/^\.I[PX].*use_loginclass/) {
+ $t = '@LCMAN@';
+ } elsif (/^\.I[PX].*(role|type)/) {
+ $t = '@SEMAN@';
+ } else {
+ $t = undef;
+ }
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+s/\\f\(\CW\@([^\@]*)\\fR\@/\@$1\@/g;
+#\f(CW@secure_path\fR@
+
+# Comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+ $_ = $t . $_;
+}