Package: licenseutils / 0.0.7-3

moving-scripts-from-pkglibexec-to-bindir.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Description: move /usr/lib/licenseutls/notice to /usr/bin
 and added manpage for the notice command
Author: Ben Asselstine <licenseutils@nym.hush.com>
Origin: http://git.savannah.gnu.org/cgit/licenseutils.git/commit/?id=4d5377a431465b4717697bc6445dcf20111d9bd6
 http://git.savannah.gnu.org/cgit/licenseutils.git/commit/?id=17ee25cb55ea45d8de3d0ba9e861acdb4f7d4b54
Last-Update: 2013-12-18

diff --git a/Makefile.am b/Makefile.am
index cbdcb11..ebc9f14 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,13 +4,13 @@
 # are permitted in any medium without royalty provided the copyright
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 ACLOCAL_AMFLAGS = -I lib/m4 -I m4 
 SUBDIRS=lib src po tests doc
 EXTRA_DIST = bootstrap bootstrap.conf TODO build-aux/config.rpath \
-	     HACKING completion/licensing lu-sh.1 styles.ac
+	     HACKING completion/licensing lu-sh.1 notice.1 styles.ac
 
 if USE_BASH_COMPLETION
   bash_completion_DATA = completion/licensing
 else
   bash_completion_DATA = 
 endif
@@ -29,12 +29,13 @@ $(srcdir)/COPYING \
 $(srcdir)/NEWS \
 $(srcdir)/TODO \
 $(srcdir)/HACKING \
 $(srcdir)/INSTALL \
 $(srcdir)/ChangeLog \
 $(srcdir)/lu-sh.1 \
+$(srcdir)/notice.1 \
 $(srcdir)/po/POTFILES.in \
 $(srcdir)/po/LINGUAS \
 $(srcdir)/doc/Makefile.am \
 $(srcdir)/doc/licenseutils.texi \
 $(srcdir)/doc/version.texi.in \
 $(srcdir)/doc/gendocs \
@@ -131,12 +132,12 @@ predist:
 	tar --dereference --directory=.. -zcvf ${PACKAGE}.tar.gz `cat ${builddir}/.manifest` && rm ${builddir}/.manifest
 
 CLEANFILES=.manifest licensing.1
 
 #this chunk of makery is about getting a man page to build,
 #despite a horribly broken help2man, and a non-standard --help in licensing.
-man1_MANS=licensing.1 lu-sh.1
+man1_MANS=licensing.1 lu-sh.1 notice.1
 
 licensing.1: $(builddir)/src/licensing
 	$(HELP2MAN) --output=$(builddir)/$@ --name='a program for adding license notices to files' --source licenseutils --libtool  $(builddir)/src/licensing
 
 

diff --git a/notice.1 b/notice.1
new file mode 100644
index 0000000..6fbcb33
--- a/dev/null
+++ b/notice.1
@@ -0,0 +1,70 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.43.3.
+.TH NOTICE "1" "December 2013" "lu-sh" "User Commands"
+.SH NAME
+notice \- a utility for writing license notices to source files.
+.SH SYNOPSIS
+.B notice
+[\fIOPTION\fR...] [\fIFILE\fR...]
+.SH DESCRIPTION
+The notice command is a simple way to add a boilerplate to a set of source-code files.  It is a wrapper script for the
+.B licensing
+program.
+
+.SH "EXAMPLES"
+
+The notice command is most often used like so:
+
+.IP
+.B
+$ licensing notice -c 'Yoyo,\ Inc.\ 2001' -l gpl -s c -n *.[ch] 
+.br
+.B
+apply: foo.c -> Boilerplate applied.
+.br
+.B
+apply: bar.c -> Boilerplate applied.
+.br
+.B
+apply: qux.c -> Boilerplate applied.
+.br
+.B
+apply: foo.h -> Boilerplate applied.
+.br
+
+.TP
+This example applies the license notice for the latest version of the GPL in the C-commenting style to all of the .c and .h files in the current directory.  The copyright holder is Yoyo, Inc, in the year 2001.
+
+
+.SH "OPTIONS"
+
+.TP
+\-n\fR
+Don't retain .bak backup files.
+.TP
+\-c \fINAME-AND-YEAR\fR
+Specify the copyright holder and years. The syntax for copyright years allows for years separated by a comma, and also ranges of years separated by a hyphen.  In most shells, the argument for this option must be enclosed in single quotes.
+.TP
+\-l \fILICENSE\fR
+Specify the license notice to apply to the source-code files.  The supported licenses are: gpl, gplv3+, gplv3, gplv2+, gplv2, gplv1+, gplv1, lgpl, lgplv3+, lgplv3, lgplv2+, lgplv2, lgplv1+, lgplv1, agpl, agplv3+, agplv3, fdl, fdlv13+, fdlv13, fdlv12+, fdlv12, fdlv11+, fdlv11, all-permissive, bsd, bsd3clause, bsd2clause, apache, apachev2, mit, isc, and openbsd.
+.TP
+\-s \fICOMMENTING-STYLE\fR
+Specify the commenting style.  The supported commenting styles are: c, c++, shell, scheme, texinfo, m4, haskell, groff, gettext, fortran, and pascal.
+.TP
+\-?, \fB\-\-help\fR
+Give a list the available options.
+
+.SH "REPORTING BUGS"
+Report bugs to <https://sv.nongnu.org/bugs/?group=licenseutils>.
+
+.SH "SEE ALSO"
+The full documentation for
+.B notice
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B licensing
+programs are properly installed at your site, the command
+.IP
+.B info licenseutils notice
+.PP
+will give you access to the complete documentation for the notice command.
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c0aaa2..1ec814f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,16 +3,15 @@
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 localedir = $(datadir)/locale
 EXTRA_DIST=styles.am
-bin_SCRIPTS=lu-sh
+bin_SCRIPTS=lu-sh notice
 bin_PROGRAMS=licensing
-pkglibexec_SCRIPTS=notice
-DEFS += -DLOCALEDIR=\"$(localedir)\" -DPROGRAM=\"$(PROGRAM)\" -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" -DINTERPRETER=\"$(INTERPRETER)\" -DINTERPRETER_PATH=\"$(bindir)/$(INTERPRETER)\" @DEFS@
+DEFS += -DLOCALEDIR=\"$(localedir)\" -DPROGRAM=\"$(PROGRAM)\" -DBINDIR=\"$(bindir)\" -DINTERPRETER=\"$(INTERPRETER)\" -DINTERPRETER_PATH=\"$(bindir)/$(INTERPRETER)\" @DEFS@
 AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
 lib_LTLIBRARIES=liblicenseutils.la 
 
 pkginclude_HEADERS=licensing.h gpl.h lgpl.h agpl.h fdl.h boilerplate.h  help.h \
 		   warranty.h welcome.h copyright.h cbb.h comment.h \
 		   uncomment.h choose.h top.h project.h apply.h \
diff --git a/src/licensing.c b/src/licensing.c
index 34eb30f..cf3f5e7 100644
--- a/src/licensing.c
+++ b/src/licensing.c
@@ -185,13 +185,13 @@ lu_parse_command (struct lu_state_t *state, char *line)
       char **argv = NULL;
       make_command_line (line, &argc, &argv);
       if (cmd->parser)
         err = cmd->parser(state, argc, argv);
       else
         {
-          char *c = xasprintf ("%s/%s", PKGLIBEXECDIR, line);
+          char *c = xasprintf ("%s/%s", BINDIR, line);
           err = system (c);
           free (c);
         }
       for (int i = 0; i < argc; i++)
         free (argv[i]);
       free (argv);