aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnonymized <anonymous@example.com>2018-01-07 18:46:04 +0100
committerAnonymized <anonymous@example.com>2018-01-07 18:46:04 +0100
commitb4eed6560a090e9b1b492b66a6d17f80025e0704 (patch)
tree1434981a9419faa210e376bf4c763d74e5f9bbc2
downloadgnunet-guile2-b4eed6560a090e9b1b492b66a6d17f80025e0704.tar.gz
gnunet-guile2-b4eed6560a090e9b1b492b66a6d17f80025e0704.zip
reboot the gnunet-guile project
-rw-r--r--.gitignore15
-rw-r--r--AUTHORS4
-rw-r--r--COPYING674
-rw-r--r--Makefile.am67
-rw-r--r--README26
-rwxr-xr-xbootstrap2
-rw-r--r--configure.ac56
-rw-r--r--doc/Makefile.am38
-rw-r--r--doc/docstyle.css76
-rw-r--r--doc/fdl-1.3.texi505
-rwxr-xr-xdoc/gendocs.sh504
-rw-r--r--doc/gendocs_template91
-rw-r--r--doc/gendocs_template_min93
-rw-r--r--doc/gnunet-guile.texi132
-rw-r--r--doc/gpl-3.0.texi717
-rw-r--r--doc/htmlxref.cnf668
-rw-r--r--doc/index.html34
-rwxr-xr-xdoc/run-gendocs.sh6
-rw-r--r--download.scm21
-rw-r--r--gnunet.scm480
-rw-r--r--gnunet/config.scm.in25
-rw-r--r--guix.scm165
-rw-r--r--pre-inst-env.in39
23 files changed, 4438 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb37ab0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
1*~
2*.go
3Makefile
4Makefile.in
5aclocal.m4
6autom4te.cache/
7build-aux/
8config.log
9config.status
10configure
11gnunet/config.scm
12pre-inst-env
13*.info
14doc/stamp-vti
15doc/version.texi \ No newline at end of file
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e910d17
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
1Rémi Delrue <asgeir@free.fr>
2Ludovic Courtès <ludo@gnu.org>
3ng0 <ng0@infotropique.org>
4Amirouche Boubekki <amirouche@hypermove.net> \ No newline at end of file
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ef40ab6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,67 @@
1# GNUnet-Guile --- Guile bindings for GNUnet.
2# Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
3# Copyright © 2017 ng0 <ng0@infotropique.org>
4# Copyright © 2018 Amirouche Boubkki <amirouche@hypermove.net>
5#
6# This file is part of GNUnet-Guile.
7#
8# GNUnet-Guile is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 3 of the License, or (at
11# your option) any later version.
12#
13# GNUnet-Guile is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with GNUnet-Guile. If not, see <http://www.gnu.org/licenses/>.
20
21SUBDIRS = doc
22docdir = $(datadir)/doc/gnunet-guile/
23
24MODULES = \
25 gnunet.scm
26
27GOBJECTS = $(MODULES:%.scm=%.go) gnunet/config.go
28
29nobase_dist_guilemodule_DATA = $(MODULES)
30nobase_nodist_guilemodule_DATA = $(GOBJECTS)
31
32AM_V_GUILEC = $(AM_V_GUILEC_$(V))
33AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
34AM_V_GUILEC_0 = @echo " GUILEC" $@;
35
36# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
37# $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
38# there that are newer than the local .scm files (for instance because the
39# user ran 'make install' recently). When that happens, we end up loading
40# those previously-installed .go files, which may be stale, thereby breaking
41# the whole thing.
42#
43# XXX: Use the C locale for when Guile lacks
44# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
45.scm.go:
46 $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
47 unset GUILE_LOAD_COMPILED_PATH ; \
48 LC_ALL=C \
49 $(top_builddir)/pre-inst-env \
50 $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
51 -Wformat -Wunbound-variable -Warity-mismatch \
52 --target="$(host)" \
53 -o "$@" "$<"
54
55SUFFIXES = .go
56
57# Make sure source files are installed first, so that the mtime of
58# installed compiled files is greater than that of installed source
59# files. See
60# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
61# for details.
62guix_install_go_files = install-nobase_nodist_guilemoduleDATA
63$(guix_install_go_files): install-nobase_dist_guilemoduleDATA
64
65SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE)
66
67CLEANFILES = $(GOBJECTS)
diff --git a/README b/README
new file mode 100644
index 0000000..c1110b7
--- /dev/null
+++ b/README
@@ -0,0 +1,26 @@
1Guile bindings for GNUnet
2—————————————————————————
3
4Work in progress!
5
6To try the stub gnunet-search clone, you must have a working GNUnet
7configuration. Edit the file `examples/search.scm` and modify the line
8
9 (define config-file "~/.gnunet/gnunet.conf")
10
11to match your current GNUnet configuration file.
12
13Then, go inside the bindings directory and run `search.scm` as a
14script. For instance, to run a search on the keywords "foo" and "bar":
15
16 $ cd guix/gnunet/
17 $ examples/search.scm "foo" "bar"
18
19This will start a 5 seconds search on the given keywords. Here’s the
20output when exactly one find matches the keyword “foo”:
21
22 gnunet-download -o "foo.txt" gnunet://fs/chk/M976V69FDSQDH74AORDDLB…
23
24You can also check your bindings with the command:
25
26 $ ./run-tests.scm
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..5a29d5f
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,2 @@
1#!/bin/sh
2autoreconf -vif
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..d8aab24
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,56 @@
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.69)
5AC_INIT([GNUnet-Guile], [0.0.1], [bug-gnunet@gnu.org], [gnunet-guile],
6 [https://gnunet.org])
7AC_CONFIG_AUX_DIR([build-aux])
8
9AM_INIT_AUTOMAKE([1.12 foreign silent-rules subdir-objects \
10 color-tests parallel-tests -Woverride -Wno-portability])
11
12# Enable silent rules by default.
13AM_SILENT_RULES([yes])
14
15AC_CONFIG_SRCDIR([gnunet])
16AC_CONFIG_MACRO_DIR([m4])
17
18AC_CANONICAL_HOST
19
20dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
21dnl Make sure they are available.
22m4_pattern_forbid([PKG_CHECK_MODULES])
23m4_pattern_forbid([GUILE_MODULE_AVAILABLE])
24
25PKG_CHECK_MODULES([GUILE], [guile-2.2 >= 2.2.3])
26AC_PATH_PROG([GUILE], [guile])
27AC_PATH_PROG([GUILD], [guild])
28if test "x$GUILD" = "x"; then
29 AC_MSG_ERROR(['guild' binary not found; please check your Guile 2.x installation.])
30fi
31
32guilemoduledir="${datarootdir}/guile/site/2.0"
33AC_SUBST([guilemoduledir])
34
35AC_CACHE_SAVE
36
37PKG_CHECK_MODULES([GNUNETUTIL], [gnunetutil])
38PKG_CHECK_MODULES([GNUNETFS], [gnunetfs])
39PKG_CHECK_MODULES([GNUNETIDENTITY], [gnunetidentity])
40
41GNUNETUTIL_LIBDIR="`$PKG_CONFIG --variable=libdir gnunetutil`"
42GNUNETFS_LIBDIR="`$PKG_CONFIG --variable=libdir gnunetfs`"
43GNUNETIDENTITY_LIBDIR="`$PKG_CONFIG --variable=libdir gnunetidentity`"
44
45AC_SUBST([GNUNETUTIL_LIBDIR])
46AC_SUBST([GNUNETFS_LIBDIR])
47AC_SUBST([GNUNETIDENTITY_LIBDIR])
48
49AC_CONFIG_FILES([
50Makefile
51gnunet/config.scm
52doc/Makefile
53])
54AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
55
56AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..394b773
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,38 @@
1# This Makefile.am is in the public domain
2docdir = $(datadir)/doc/gnunet-guile/
3
4infoimagedir = $(infodir)/images
5
6AM_MAKEINFOHTMLFLAGS = --no-split --css-ref=docstyle.css
7
8info_TEXINFOS = \
9 gnunet-guile.texi
10
11gnunet_TEXINFOS = \
12 fdl-1.3.texi \
13 gpl-3.0.texi
14
15EXTRA_DIST = \
16 $(gnunet_TEXINFOS) \
17 htmlxref.cnf \
18 run-gendocs.sh \
19 docstyle.css
20
21DISTCLEANFILES = \
22 fdl-1.3.cps \
23 gpl-3.0.cps
24
25doc-gendoc-install:
26 @mkdir -p $(DESTDIR)/$(docdir)
27 @cp -r manual $(DESTDIR)/$(docdir)
28
29# TODO: Add more to clean.
30clean:
31 @rm gnunet-guile.pdf
32 @rm gnunet-guile.html
33 @rm gnunet-guile.info
34 @rm gnunet-guile.info-1
35 @rm gnunet-guile.info-2
36 @rm gnunet-guile.info-3
37 @rm -r gnunet-guile.t2p
38 @rm -r manual
diff --git a/doc/docstyle.css b/doc/docstyle.css
new file mode 100644
index 0000000..8719248
--- /dev/null
+++ b/doc/docstyle.css
@@ -0,0 +1,76 @@
1html, body {
2 font-size: 1em;
3 text-align: left;
4 text-decoration: none;
5}
6html { background-color: #e7e7e7; }
7
8body {
9 max-width: 74.92em;
10 margin: 0 auto;
11 padding: .5em 1em 1em 1em;
12 background-color: white;
13 border: .1em solid #c0c0c0;
14}
15
16h1, h2, h3, h4 { color: #333; }
17h5, h6, dt { color: #222; }
18
19
20a h3 {
21 color: #005090;
22}
23
24a[href] { color: #005090; }
25a[href]:visited { color: #100070; }
26a[href]:active, a[href]:hover {
27 color: #100070;
28 text-decoration: none;
29}
30
31.linkrow {
32 margin: 3em 0;
33}
34
35.linkrow {
36 text-align: center;
37}
38
39div.example { padding: .8em 1.2em .4em; }
40pre.example { padding: .8em 1.2em; }
41div.example, pre.example {
42 margin: 1em 0 1em 3% ;
43 -webkit-border-radius: .3em;
44 -moz-border-radius: .3em;
45 border-radius: .3em;
46 border: 1px solid #d4cbb6;
47 background-color: #f2efe4;
48}
49div.example > pre.example {
50 padding: 0 0 .4em;
51 margin: 0;
52 border: none;
53}
54
55
56/* This makes the very long tables of contents in Gnulib and other
57 manuals easier to read. */
58.contents ul, .shortcontents ul { font-weight: bold; }
59.contents ul ul, .shortcontents ul ul { font-weight: normal; }
60.contents ul { list-style: none; }
61
62/* For colored navigation bars (Emacs manual): make the bar extend
63 across the whole width of the page and give it a decent height. */
64.header, .node { margin: 0 -1em; padding: 0 1em; }
65.header p, .node p { line-height: 2em; }
66
67/* For navigation links */
68.node a, .header a { display: inline-block; line-height: 2em; }
69.node a:hover, .header a:hover { background: #f2efe4; }
70
71table.cartouche {
72 border-collapse: collapse;
73 border-color: darkred;
74 border-style: solid;
75 border-width: 3px;
76}
diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi
new file mode 100644
index 0000000..cb71f05
--- /dev/null
+++ b/doc/fdl-1.3.texi
@@ -0,0 +1,505 @@
1@c The GNU Free Documentation License.
2@center Version 1.3, 3 November 2008
3
4@c This file is intended to be included within another document,
5@c hence no sectioning command or @node.
6
7@display
8Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
9@uref{http://fsf.org/}
10
11Everyone is permitted to copy and distribute verbatim copies
12of this license document, but changing it is not allowed.
13@end display
14
15@enumerate 0
16@item
17PREAMBLE
18
19The purpose of this License is to make a manual, textbook, or other
20functional and useful document @dfn{free} in the sense of freedom: to
21assure everyone the effective freedom to copy and redistribute it,
22with or without modifying it, either commercially or noncommercially.
23Secondarily, this License preserves for the author and publisher a way
24to get credit for their work, while not being considered responsible
25for modifications made by others.
26
27This License is a kind of ``copyleft'', which means that derivative
28works of the document must themselves be free in the same sense. It
29complements the GNU General Public License, which is a copyleft
30license designed for free software.
31
32We have designed this License in order to use it for manuals for free
33software, because free software needs free documentation: a free
34program should come with manuals providing the same freedoms that the
35software does. But this License is not limited to software manuals;
36it can be used for any textual work, regardless of subject matter or
37whether it is published as a printed book. We recommend this License
38principally for works whose purpose is instruction or reference.
39
40@item
41APPLICABILITY AND DEFINITIONS
42
43This License applies to any manual or other work, in any medium, that
44contains a notice placed by the copyright holder saying it can be
45distributed under the terms of this License. Such a notice grants a
46world-wide, royalty-free license, unlimited in duration, to use that
47work under the conditions stated herein. The ``Document'', below,
48refers to any such manual or work. Any member of the public is a
49licensee, and is addressed as ``you''. You accept the license if you
50copy, modify or distribute the work in a way requiring permission
51under copyright law.
52
53A ``Modified Version'' of the Document means any work containing the
54Document or a portion of it, either copied verbatim, or with
55modifications and/or translated into another language.
56
57A ``Secondary Section'' is a named appendix or a front-matter section
58of the Document that deals exclusively with the relationship of the
59publishers or authors of the Document to the Document's overall
60subject (or to related matters) and contains nothing that could fall
61directly within that overall subject. (Thus, if the Document is in
62part a textbook of mathematics, a Secondary Section may not explain
63any mathematics.) The relationship could be a matter of historical
64connection with the subject or with related matters, or of legal,
65commercial, philosophical, ethical or political position regarding
66them.
67
68The ``Invariant Sections'' are certain Secondary Sections whose titles
69are designated, as being those of Invariant Sections, in the notice
70that says that the Document is released under this License. If a
71section does not fit the above definition of Secondary then it is not
72allowed to be designated as Invariant. The Document may contain zero
73Invariant Sections. If the Document does not identify any Invariant
74Sections then there are none.
75
76The ``Cover Texts'' are certain short passages of text that are listed,
77as Front-Cover Texts or Back-Cover Texts, in the notice that says that
78the Document is released under this License. A Front-Cover Text may
79be at most 5 words, and a Back-Cover Text may be at most 25 words.
80
81A ``Transparent'' copy of the Document means a machine-readable copy,
82represented in a format whose specification is available to the
83general public, that is suitable for revising the document
84straightforwardly with generic text editors or (for images composed of
85pixels) generic paint programs or (for drawings) some widely available
86drawing editor, and that is suitable for input to text formatters or
87for automatic translation to a variety of formats suitable for input
88to text formatters. A copy made in an otherwise Transparent file
89format whose markup, or absence of markup, has been arranged to thwart
90or discourage subsequent modification by readers is not Transparent.
91An image format is not Transparent if used for any substantial amount
92of text. A copy that is not ``Transparent'' is called ``Opaque''.
93
94Examples of suitable formats for Transparent copies include plain
95ASCII without markup, Texinfo input format, La@TeX{} input
96format, SGML or XML using a publicly available
97DTD, and standard-conforming simple HTML,
98PostScript or PDF designed for human modification. Examples
99of transparent image formats include PNG, XCF and
100JPG. Opaque formats include proprietary formats that can be
101read and edited only by proprietary word processors, SGML or
102XML for which the DTD and/or processing tools are
103not generally available, and the machine-generated HTML,
104PostScript or PDF produced by some word processors for
105output purposes only.
106
107The ``Title Page'' means, for a printed book, the title page itself,
108plus such following pages as are needed to hold, legibly, the material
109this License requires to appear in the title page. For works in
110formats which do not have any title page as such, ``Title Page'' means
111the text near the most prominent appearance of the work's title,
112preceding the beginning of the body of the text.
113
114The ``publisher'' means any person or entity that distributes copies
115of the Document to the public.
116
117A section ``Entitled XYZ'' means a named subunit of the Document whose
118title either is precisely XYZ or contains XYZ in parentheses following
119text that translates XYZ in another language. (Here XYZ stands for a
120specific section name mentioned below, such as ``Acknowledgements'',
121``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
122of such a section when you modify the Document means that it remains a
123section ``Entitled XYZ'' according to this definition.
124
125The Document may include Warranty Disclaimers next to the notice which
126states that this License applies to the Document. These Warranty
127Disclaimers are considered to be included by reference in this
128License, but only as regards disclaiming warranties: any other
129implication that these Warranty Disclaimers may have is void and has
130no effect on the meaning of this License.
131
132@item
133VERBATIM COPYING
134
135You may copy and distribute the Document in any medium, either
136commercially or noncommercially, provided that this License, the
137copyright notices, and the license notice saying this License applies
138to the Document are reproduced in all copies, and that you add no other
139conditions whatsoever to those of this License. You may not use
140technical measures to obstruct or control the reading or further
141copying of the copies you make or distribute. However, you may accept
142compensation in exchange for copies. If you distribute a large enough
143number of copies you must also follow the conditions in section 3.
144
145You may also lend copies, under the same conditions stated above, and
146you may publicly display copies.
147
148@item
149COPYING IN QUANTITY
150
151If you publish printed copies (or copies in media that commonly have
152printed covers) of the Document, numbering more than 100, and the
153Document's license notice requires Cover Texts, you must enclose the
154copies in covers that carry, clearly and legibly, all these Cover
155Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
156the back cover. Both covers must also clearly and legibly identify
157you as the publisher of these copies. The front cover must present
158the full title with all words of the title equally prominent and
159visible. You may add other material on the covers in addition.
160Copying with changes limited to the covers, as long as they preserve
161the title of the Document and satisfy these conditions, can be treated
162as verbatim copying in other respects.
163
164If the required texts for either cover are too voluminous to fit
165legibly, you should put the first ones listed (as many as fit
166reasonably) on the actual cover, and continue the rest onto adjacent
167pages.
168
169If you publish or distribute Opaque copies of the Document numbering
170more than 100, you must either include a machine-readable Transparent
171copy along with each Opaque copy, or state in or with each Opaque copy
172a computer-network location from which the general network-using
173public has access to download using public-standard network protocols
174a complete Transparent copy of the Document, free of added material.
175If you use the latter option, you must take reasonably prudent steps,
176when you begin distribution of Opaque copies in quantity, to ensure
177that this Transparent copy will remain thus accessible at the stated
178location until at least one year after the last time you distribute an
179Opaque copy (directly or through your agents or retailers) of that
180edition to the public.
181
182It is requested, but not required, that you contact the authors of the
183Document well before redistributing any large number of copies, to give
184them a chance to provide you with an updated version of the Document.
185
186@item
187MODIFICATIONS
188
189You may copy and distribute a Modified Version of the Document under
190the conditions of sections 2 and 3 above, provided that you release
191the Modified Version under precisely this License, with the Modified
192Version filling the role of the Document, thus licensing distribution
193and modification of the Modified Version to whoever possesses a copy
194of it. In addition, you must do these things in the Modified Version:
195
196@enumerate A
197@item
198Use in the Title Page (and on the covers, if any) a title distinct
199from that of the Document, and from those of previous versions
200(which should, if there were any, be listed in the History section
201of the Document). You may use the same title as a previous version
202if the original publisher of that version gives permission.
203
204@item
205List on the Title Page, as authors, one or more persons or entities
206responsible for authorship of the modifications in the Modified
207Version, together with at least five of the principal authors of the
208Document (all of its principal authors, if it has fewer than five),
209unless they release you from this requirement.
210
211@item
212State on the Title page the name of the publisher of the
213Modified Version, as the publisher.
214
215@item
216Preserve all the copyright notices of the Document.
217
218@item
219Add an appropriate copyright notice for your modifications
220adjacent to the other copyright notices.
221
222@item
223Include, immediately after the copyright notices, a license notice
224giving the public permission to use the Modified Version under the
225terms of this License, in the form shown in the Addendum below.
226
227@item
228Preserve in that license notice the full lists of Invariant Sections
229and required Cover Texts given in the Document's license notice.
230
231@item
232Include an unaltered copy of this License.
233
234@item
235Preserve the section Entitled ``History'', Preserve its Title, and add
236to it an item stating at least the title, year, new authors, and
237publisher of the Modified Version as given on the Title Page. If
238there is no section Entitled ``History'' in the Document, create one
239stating the title, year, authors, and publisher of the Document as
240given on its Title Page, then add an item describing the Modified
241Version as stated in the previous sentence.
242
243@item
244Preserve the network location, if any, given in the Document for
245public access to a Transparent copy of the Document, and likewise
246the network locations given in the Document for previous versions
247it was based on. These may be placed in the ``History'' section.
248You may omit a network location for a work that was published at
249least four years before the Document itself, or if the original
250publisher of the version it refers to gives permission.
251
252@item
253For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
254the Title of the section, and preserve in the section all the
255substance and tone of each of the contributor acknowledgements and/or
256dedications given therein.
257
258@item
259Preserve all the Invariant Sections of the Document,
260unaltered in their text and in their titles. Section numbers
261or the equivalent are not considered part of the section titles.
262
263@item
264Delete any section Entitled ``Endorsements''. Such a section
265may not be included in the Modified Version.
266
267@item
268Do not retitle any existing section to be Entitled ``Endorsements'' or
269to conflict in title with any Invariant Section.
270
271@item
272Preserve any Warranty Disclaimers.
273@end enumerate
274
275If the Modified Version includes new front-matter sections or
276appendices that qualify as Secondary Sections and contain no material
277copied from the Document, you may at your option designate some or all
278of these sections as invariant. To do this, add their titles to the
279list of Invariant Sections in the Modified Version's license notice.
280These titles must be distinct from any other section titles.
281
282You may add a section Entitled ``Endorsements'', provided it contains
283nothing but endorsements of your Modified Version by various
284parties---for example, statements of peer review or that the text has
285been approved by an organization as the authoritative definition of a
286standard.
287
288You may add a passage of up to five words as a Front-Cover Text, and a
289passage of up to 25 words as a Back-Cover Text, to the end of the list
290of Cover Texts in the Modified Version. Only one passage of
291Front-Cover Text and one of Back-Cover Text may be added by (or
292through arrangements made by) any one entity. If the Document already
293includes a cover text for the same cover, previously added by you or
294by arrangement made by the same entity you are acting on behalf of,
295you may not add another; but you may replace the old one, on explicit
296permission from the previous publisher that added the old one.
297
298The author(s) and publisher(s) of the Document do not by this License
299give permission to use their names for publicity for or to assert or
300imply endorsement of any Modified Version.
301
302@item
303COMBINING DOCUMENTS
304
305You may combine the Document with other documents released under this
306License, under the terms defined in section 4 above for modified
307versions, provided that you include in the combination all of the
308Invariant Sections of all of the original documents, unmodified, and
309list them all as Invariant Sections of your combined work in its
310license notice, and that you preserve all their Warranty Disclaimers.
311
312The combined work need only contain one copy of this License, and
313multiple identical Invariant Sections may be replaced with a single
314copy. If there are multiple Invariant Sections with the same name but
315different contents, make the title of each such section unique by
316adding at the end of it, in parentheses, the name of the original
317author or publisher of that section if known, or else a unique number.
318Make the same adjustment to the section titles in the list of
319Invariant Sections in the license notice of the combined work.
320
321In the combination, you must combine any sections Entitled ``History''
322in the various original documents, forming one section Entitled
323``History''; likewise combine any sections Entitled ``Acknowledgements'',
324and any sections Entitled ``Dedications''. You must delete all
325sections Entitled ``Endorsements.''
326
327@item
328COLLECTIONS OF DOCUMENTS
329
330You may make a collection consisting of the Document and other documents
331released under this License, and replace the individual copies of this
332License in the various documents with a single copy that is included in
333the collection, provided that you follow the rules of this License for
334verbatim copying of each of the documents in all other respects.
335
336You may extract a single document from such a collection, and distribute
337it individually under this License, provided you insert a copy of this
338License into the extracted document, and follow this License in all
339other respects regarding verbatim copying of that document.
340
341@item
342AGGREGATION WITH INDEPENDENT WORKS
343
344A compilation of the Document or its derivatives with other separate
345and independent documents or works, in or on a volume of a storage or
346distribution medium, is called an ``aggregate'' if the copyright
347resulting from the compilation is not used to limit the legal rights
348of the compilation's users beyond what the individual works permit.
349When the Document is included in an aggregate, this License does not
350apply to the other works in the aggregate which are not themselves
351derivative works of the Document.
352
353If the Cover Text requirement of section 3 is applicable to these
354copies of the Document, then if the Document is less than one half of
355the entire aggregate, the Document's Cover Texts may be placed on
356covers that bracket the Document within the aggregate, or the
357electronic equivalent of covers if the Document is in electronic form.
358Otherwise they must appear on printed covers that bracket the whole
359aggregate.
360
361@item
362TRANSLATION
363
364Translation is considered a kind of modification, so you may
365distribute translations of the Document under the terms of section 4.
366Replacing Invariant Sections with translations requires special
367permission from their copyright holders, but you may include
368translations of some or all Invariant Sections in addition to the
369original versions of these Invariant Sections. You may include a
370translation of this License, and all the license notices in the
371Document, and any Warranty Disclaimers, provided that you also include
372the original English version of this License and the original versions
373of those notices and disclaimers. In case of a disagreement between
374the translation and the original version of this License or a notice
375or disclaimer, the original version will prevail.
376
377If a section in the Document is Entitled ``Acknowledgements'',
378``Dedications'', or ``History'', the requirement (section 4) to Preserve
379its Title (section 1) will typically require changing the actual
380title.
381
382@item
383TERMINATION
384
385You may not copy, modify, sublicense, or distribute the Document
386except as expressly provided under this License. Any attempt
387otherwise to copy, modify, sublicense, or distribute it is void, and
388will automatically terminate your rights under this License.
389
390However, if you cease all violation of this License, then your license
391from a particular copyright holder is reinstated (a) provisionally,
392unless and until the copyright holder explicitly and finally
393terminates your license, and (b) permanently, if the copyright holder
394fails to notify you of the violation by some reasonable means prior to
39560 days after the cessation.
396
397Moreover, your license from a particular copyright holder is
398reinstated permanently if the copyright holder notifies you of the
399violation by some reasonable means, this is the first time you have
400received notice of violation of this License (for any work) from that
401copyright holder, and you cure the violation prior to 30 days after
402your receipt of the notice.
403
404Termination of your rights under this section does not terminate the
405licenses of parties who have received copies or rights from you under
406this License. If your rights have been terminated and not permanently
407reinstated, receipt of a copy of some or all of the same material does
408not give you any rights to use it.
409
410@item
411FUTURE REVISIONS OF THIS LICENSE
412
413The Free Software Foundation may publish new, revised versions
414of the GNU Free Documentation License from time to time. Such new
415versions will be similar in spirit to the present version, but may
416differ in detail to address new problems or concerns. See
417@uref{http://www.gnu.org/copyleft/}.
418
419Each version of the License is given a distinguishing version number.
420If the Document specifies that a particular numbered version of this
421License ``or any later version'' applies to it, you have the option of
422following the terms and conditions either of that specified version or
423of any later version that has been published (not as a draft) by the
424Free Software Foundation. If the Document does not specify a version
425number of this License, you may choose any version ever published (not
426as a draft) by the Free Software Foundation. If the Document
427specifies that a proxy can decide which future versions of this
428License can be used, that proxy's public statement of acceptance of a
429version permanently authorizes you to choose that version for the
430Document.
431
432@item
433RELICENSING
434
435``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
436World Wide Web server that publishes copyrightable works and also
437provides prominent facilities for anybody to edit those works. A
438public wiki that anybody can edit is an example of such a server. A
439``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
440site means any set of copyrightable works thus published on the MMC
441site.
442
443``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
444license published by Creative Commons Corporation, a not-for-profit
445corporation with a principal place of business in San Francisco,
446California, as well as future copyleft versions of that license
447published by that same organization.
448
449``Incorporate'' means to publish or republish a Document, in whole or
450in part, as part of another Document.
451
452An MMC is ``eligible for relicensing'' if it is licensed under this
453License, and if all works that were first published under this License
454somewhere other than this MMC, and subsequently incorporated in whole
455or in part into the MMC, (1) had no cover texts or invariant sections,
456and (2) were thus incorporated prior to November 1, 2008.
457
458The operator of an MMC Site may republish an MMC contained in the site
459under CC-BY-SA on the same site at any time before August 1, 2009,
460provided the MMC is eligible for relicensing.
461
462@end enumerate
463
464@page
465@heading ADDENDUM: How to use this License for your documents
466
467To use this License in a document you have written, include a copy of
468the License in the document and put the following copyright and
469license notices just after the title page:
470
471@smallexample
472@group
473 Copyright (C) @var{year} @var{your name}.
474 Permission is granted to copy, distribute and/or modify this document
475 under the terms of the GNU Free Documentation License, Version 1.3
476 or any later version published by the Free Software Foundation;
477 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
478 Texts. A copy of the license is included in the section entitled ``GNU
479 Free Documentation License''.
480@end group
481@end smallexample
482
483If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
484replace the ``with@dots{}Texts.''@: line with this:
485
486@smallexample
487@group
488 with the Invariant Sections being @var{list their titles}, with
489 the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
490 being @var{list}.
491@end group
492@end smallexample
493
494If you have Invariant Sections without Cover Texts, or some other
495combination of the three, merge those two alternatives to suit the
496situation.
497
498If your document contains nontrivial examples of program code, we
499recommend releasing these examples in parallel under your choice of
500free software license, such as the GNU General Public License,
501to permit their use in free software.
502
503@c Local Variables:
504@c ispell-local-pdict: "ispell-dict"
505@c End:
diff --git a/doc/gendocs.sh b/doc/gendocs.sh
new file mode 100755
index 0000000..3b71b36
--- /dev/null
+++ b/doc/gendocs.sh
@@ -0,0 +1,504 @@
1#!/bin/sh -e
2# gendocs.sh -- generate a GNU manual in many formats. This script is
3# mentioned in maintain.texi. See the help message below for usage details.
4
5scriptversion=2016-12-31.18
6
7# Copyright 2003-2017 Free Software Foundation, Inc.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#
22# Original author: Mohit Agarwal.
23# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
24#
25# The latest version of this script, and the companion template, is
26# available from the Gnulib repository:
27#
28# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
29# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
30
31# TODO:
32# - image importing was only implemented for HTML generated by
33# makeinfo. But it should be simple enough to adjust.
34# - images are not imported in the source tarball. All the needed
35# formats (PDF, PNG, etc.) should be included.
36
37prog=`basename "$0"`
38srcdir=`pwd`
39
40scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
41templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
42
43: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
44: ${MAKEINFO="makeinfo"}
45: ${TEXI2DVI="texi2dvi"}
46: ${DOCBOOK2HTML="docbook2html"}
47: ${DOCBOOK2PDF="docbook2pdf"}
48: ${DOCBOOK2TXT="docbook2txt"}
49: ${GENDOCS_TEMPLATE_DIR="."}
50: ${PERL='perl'}
51: ${TEXI2HTML="texi2html"}
52unset CDPATH
53unset use_texi2html
54
55MANUAL_TITLE=
56PACKAGE=
57EMAIL=webmasters@gnu.org # please override with --email
58commonarg= # passed to all makeinfo/texi2html invcations.
59dirargs= # passed to all tools (-I dir).
60dirs= # -I directories.
61htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
62infoarg=--no-split
63generate_ascii=true
64generate_html=true
65generate_info=true
66generate_tex=true
67outdir=manual
68source_extra=
69split=node
70srcfile=
71texarg="-t @finalout"
72
73version="gendocs.sh $scriptversion
74
75Copyright 2017 Free Software Foundation, Inc.
76There is NO warranty. You may redistribute this software
77under the terms of the GNU General Public License.
78For more information about these matters, see the files named COPYING."
79
80usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
81
82Generate output in various formats from PACKAGE.texinfo (or .texi or
83.txi) source. See the GNU Maintainers document for a more extensive
84discussion:
85 http://www.gnu.org/prep/maintain_toc.html
86
87Options:
88 --email ADR use ADR as contact in generated web pages; always give this.
89
90 -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
91 -o OUTDIR write files into OUTDIR, instead of manual/.
92 -I DIR append DIR to the Texinfo search path.
93 --common ARG pass ARG in all invocations.
94 --html ARG pass ARG to makeinfo or texi2html for HTML targets,
95 instead of '$htmlarg'.
96 --info ARG pass ARG to makeinfo for Info, instead of --no-split.
97 --no-ascii skip generating the plain text output.
98 --no-html skip generating the html output.
99 --no-info skip generating the info output.
100 --no-tex skip generating the dvi and pdf output.
101 --source ARG include ARG in tar archive of sources.
102 --split HOW make split HTML by node, section, chapter; default node.
103 --tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
104
105 --texi2html use texi2html to make HTML target, with all split versions.
106 --docbook convert through DocBook too (xml, txt, html, pdf).
107
108 --help display this help and exit successfully.
109 --version display version information and exit successfully.
110
111Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
112
113Typical sequence:
114 cd PACKAGESOURCE/doc
115 wget \"$scripturl\"
116 wget \"$templateurl\"
117 $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
118
119Output will be in a new subdirectory \"manual\" (by default;
120use -o OUTDIR to override). Move all the new files into your web CVS
121tree, as explained in the Web Pages node of maintain.texi.
122
123Please use the --email ADDRESS option so your own bug-reporting
124address will be used in the generated HTML pages.
125
126MANUAL-TITLE is included as part of the HTML <title> of the overall
127manual/index.html file. It should include the name of the package being
128documented. manual/index.html is created by substitution from the file
129$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
130generic template for your own purposes.)
131
132If you have several manuals, you'll need to run this script several
133times with different MANUAL values, specifying a different output
134directory with -o each time. Then write (by hand) an overall index.html
135with links to them all.
136
137If a manual's Texinfo sources are spread across several directories,
138first copy or symlink all Texinfo sources into a single directory.
139(Part of the script's work is to make a tar.gz of the sources.)
140
141As implied above, by default monolithic Info files are generated.
142If you want split Info, or other Info options, use --info to override.
143
144You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
145and PERL to control the programs that get executed, and
146GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
147looked for. With --docbook, the environment variables DOCBOOK2HTML,
148DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
149
150By default, makeinfo and texi2dvi are run in the default (English)
151locale, since that's the language of most Texinfo manuals. If you
152happen to have a non-English manual and non-English web site, see the
153SETLANG setting in the source.
154
155Email bug reports or enhancement requests to bug-gnulib@gnu.org.
156"
157
158while test $# -gt 0; do
159 case $1 in
160 -s) shift; srcfile=$1;;
161 -o) shift; outdir=$1;;
162 -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
163 --common) shift; commonarg=$1;;
164 --docbook) docbook=yes;;
165 --email) shift; EMAIL=$1;;
166 --html) shift; htmlarg=$1;;
167 --info) shift; infoarg=$1;;
168 --no-ascii) generate_ascii=false;;
169 --no-html) generate_ascii=false;;
170 --no-info) generate_info=false;;
171 --no-tex) generate_tex=false;;
172 --source) shift; source_extra=$1;;
173 --split) shift; split=$1;;
174 --tex) shift; texarg=$1;;
175 --texi2html) use_texi2html=1;;
176
177 --help) echo "$usage"; exit 0;;
178 --version) echo "$version"; exit 0;;
179 -*)
180 echo "$0: Unknown option \`$1'." >&2
181 echo "$0: Try \`--help' for more information." >&2
182 exit 1;;
183 *)
184 if test -z "$PACKAGE"; then
185 PACKAGE=$1
186 elif test -z "$MANUAL_TITLE"; then
187 MANUAL_TITLE=$1
188 else
189 echo "$0: extra non-option argument \`$1'." >&2
190 exit 1
191 fi;;
192 esac
193 shift
194done
195
196# makeinfo uses the dirargs, but texi2dvi doesn't.
197commonarg=" $dirargs $commonarg"
198
199# For most of the following, the base name is just $PACKAGE
200base=$PACKAGE
201
202if test -n "$srcfile"; then
203 # but here, we use the basename of $srcfile
204 base=`basename "$srcfile"`
205 case $base in
206 *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
207 esac
208 PACKAGE=$base
209elif test -s "$srcdir/$PACKAGE.texinfo"; then
210 srcfile=$srcdir/$PACKAGE.texinfo
211elif test -s "$srcdir/$PACKAGE.texi"; then
212 srcfile=$srcdir/$PACKAGE.texi
213elif test -s "$srcdir/$PACKAGE.txi"; then
214 srcfile=$srcdir/$PACKAGE.txi
215else
216 echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
217 exit 1
218fi
219
220if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
221 echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
222 echo "$0: it is available from $templateurl." >&2
223 exit 1
224fi
225
226# Function to return size of $1 in something resembling kilobytes.
227calcsize()
228{
229 size=`ls -ksl $1 | awk '{print $1}'`
230 echo $size
231}
232
233# copy_images OUTDIR HTML-FILE...
234# -------------------------------
235# Copy all the images needed by the HTML-FILEs into OUTDIR.
236# Look for them in . and the -I directories; this is simpler than what
237# makeinfo supports with -I, but hopefully it will suffice.
238copy_images()
239{
240 local odir
241 odir=$1
242 shift
243 $PERL -n -e "
244BEGIN {
245 \$me = '$prog';
246 \$odir = '$odir';
247 @dirs = qw(. $dirs);
248}
249" -e '
250/<img src="(.*?)"/g && ++$need{$1};
251
252END {
253 #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
254 FILE: for my $f (keys %need) {
255 for my $d (@dirs) {
256 if (-f "$d/$f") {
257 use File::Basename;
258 my $dest = dirname ("$odir/$f");
259 #
260 use File::Path;
261 -d $dest || mkpath ($dest)
262 || die "$me: cannot mkdir $dest: $!\n";
263 #
264 use File::Copy;
265 copy ("$d/$f", $dest)
266 || die "$me: cannot copy $d/$f to $dest: $!\n";
267 next FILE;
268 }
269 }
270 die "$me: $ARGV: cannot find image $f\n";
271 }
272}
273' -- "$@" || exit 1
274}
275
276case $outdir in
277 /*) abs_outdir=$outdir;;
278 *) abs_outdir=$srcdir/$outdir;;
279esac
280
281echo "Making output for $srcfile"
282echo " in `pwd`"
283mkdir -p "$outdir/"
284
285#
286if $generate_info; then
287 cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
288 echo "Generating info... ($cmd)"
289 rm -f $PACKAGE.info* # get rid of any strays
290 eval "$cmd"
291 tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
292 ls -l "$outdir/$PACKAGE.info.tar.gz"
293 info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
294 # do not mv the info files, there's no point in having them available
295 # separately on the web.
296fi # end info
297
298#
299if $generate_tex; then
300 cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
301 printf "\nGenerating dvi... ($cmd)\n"
302 eval "$cmd"
303 # compress/finish dvi:
304 gzip -f -9 $PACKAGE.dvi
305 dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
306 mv $PACKAGE.dvi.gz "$outdir/"
307 ls -l "$outdir/$PACKAGE.dvi.gz"
308
309 cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
310 printf "\nGenerating pdf... ($cmd)\n"
311 eval "$cmd"
312 pdf_size=`calcsize $PACKAGE.pdf`
313 mv $PACKAGE.pdf "$outdir/"
314 ls -l "$outdir/$PACKAGE.pdf"
315fi # end tex (dvi + pdf)
316
317#
318if $generate_ascii; then
319 opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
320 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
321 printf "\nGenerating ascii... ($cmd)\n"
322 eval "$cmd"
323 ascii_size=`calcsize $PACKAGE.txt`
324 gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
325 ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
326 mv $PACKAGE.txt "$outdir/"
327 ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
328fi
329
330#
331
332if $generate_html; then
333# Split HTML at level $1. Used for texi2html.
334html_split()
335{
336 opt="--split=$1 --node-files $commonarg $htmlarg"
337 cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
338 printf "\nGenerating html by $1... ($cmd)\n"
339 eval "$cmd"
340 split_html_dir=$PACKAGE.html
341 (
342 cd ${split_html_dir} || exit 1
343 ln -sf ${PACKAGE}.html index.html
344 tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
345 )
346 eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
347 rm -f "$outdir"/html_$1/*.html
348 mkdir -p "$outdir/html_$1/"
349 mv ${split_html_dir}/*.html "$outdir/html_$1/"
350 rmdir ${split_html_dir}
351}
352
353if test -z "$use_texi2html"; then
354 opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
355 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
356 printf "\nGenerating monolithic html... ($cmd)\n"
357 rm -rf $PACKAGE.html # in case a directory is left over
358 eval "$cmd"
359 html_mono_size=`calcsize $PACKAGE.html`
360 gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
361 html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
362 copy_images "$outdir/" $PACKAGE.html
363 mv $PACKAGE.html "$outdir/"
364 ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
365
366 # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
367 # it just always split by node. So if we're splitting by node anyway,
368 # leave it out.
369 if test "x$split" = xnode; then
370 split_arg=
371 else
372 split_arg=--split=$split
373 fi
374 #
375 opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
376 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
377 printf "\nGenerating html by $split... ($cmd)\n"
378 eval "$cmd"
379 split_html_dir=$PACKAGE.html
380 copy_images $split_html_dir/ $split_html_dir/*.html
381 (
382 cd $split_html_dir || exit 1
383 tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
384 )
385 eval \
386 html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
387 rm -rf "$outdir/html_$split/"
388 mv $split_html_dir "$outdir/html_$split/"
389 du -s "$outdir/html_$split/"
390 ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
391
392else # use texi2html:
393 opt="--output $PACKAGE.html $commonarg $htmlarg"
394 cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
395 printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
396 rm -rf $PACKAGE.html # in case a directory is left over
397 eval "$cmd"
398 html_mono_size=`calcsize $PACKAGE.html`
399 gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
400 html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
401 mv $PACKAGE.html "$outdir/"
402
403 html_split node
404 html_split chapter
405 html_split section
406fi
407fi # end html
408
409#
410printf "\nMaking .tar.gz for sources...\n"
411d=`dirname $srcfile`
412(
413 cd "$d"
414 srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
415 tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
416 ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
417)
418texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
419
420#
421# Do everything again through docbook.
422if test -n "$docbook"; then
423 opt="-o - --docbook $commonarg"
424 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
425 printf "\nGenerating docbook XML... ($cmd)\n"
426 eval "$cmd"
427 docbook_xml_size=`calcsize $PACKAGE-db.xml`
428 gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
429 docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
430 mv $PACKAGE-db.xml "$outdir/"
431
432 split_html_db_dir=html_node_db
433 opt="$commonarg -o $split_html_db_dir"
434 cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
435 printf "\nGenerating docbook HTML... ($cmd)\n"
436 eval "$cmd"
437 (
438 cd ${split_html_db_dir} || exit 1
439 tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
440 )
441 html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
442 rm -f "$outdir"/html_node_db/*.html
443 mkdir -p "$outdir/html_node_db"
444 mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
445 rmdir ${split_html_db_dir}
446
447 cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
448 printf "\nGenerating docbook ASCII... ($cmd)\n"
449 eval "$cmd"
450 docbook_ascii_size=`calcsize $PACKAGE-db.txt`
451 mv $PACKAGE-db.txt "$outdir/"
452
453 cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
454 printf "\nGenerating docbook PDF... ($cmd)\n"
455 eval "$cmd"
456 docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
457 mv $PACKAGE-db.pdf "$outdir/"
458fi
459
460#
461printf "\nMaking index.html for $PACKAGE...\n"
462if test -z "$use_texi2html"; then
463 CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
464 /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
465else
466 # should take account of --split here.
467 CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
468fi
469
470curdate=`$SETLANG date '+%B %d, %Y'`
471sed \
472 -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
473 -e "s!%%EMAIL%%!$EMAIL!g" \
474 -e "s!%%PACKAGE%%!$PACKAGE!g" \
475 -e "s!%%DATE%%!$curdate!g" \
476 -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
477 -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
478 -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
479 -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
480 -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
481 -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
482 -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
483 -e "s!%%PDF_SIZE%%!$pdf_size!g" \
484 -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
485 -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
486 -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
487 -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
488 -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
489 -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
490 -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
491 -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
492 -e "s,%%SCRIPTURL%%,$scripturl,g" \
493 -e "s!%%SCRIPTNAME%%!$prog!g" \
494 -e "$CONDS" \
495$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
496
497echo "Done, see $outdir/ subdirectory for new files."
498
499# Local variables:
500# eval: (add-hook 'write-file-hooks 'time-stamp)
501# time-stamp-start: "scriptversion="
502# time-stamp-format: "%:y-%02m-%02d.%02H"
503# time-stamp-end: "$"
504# End:
diff --git a/doc/gendocs_template b/doc/gendocs_template
new file mode 100644
index 0000000..178f6cb
--- /dev/null
+++ b/doc/gendocs_template
@@ -0,0 +1,91 @@
1<!--#include virtual="/server/header.html" -->
2<!-- Parent-Version: 1.77 -->
3<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
4<!--#include virtual="/server/banner.html" -->
5<h2>%%TITLE%%</h2>
6
7<address>Free Software Foundation</address>
8<address>last updated %%DATE%%</address>
9
10<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
11
12<ul>
13<li><a href="%%PACKAGE%%.html">HTML
14 (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
15<li><a href="html_node/index.html">HTML</a> - with one web page per
16 node.</li>
17%%IF HTML_SECTION%%
18<li><a href="html_section/index.html">HTML</a> - with one web page per
19 section.</li>
20%%ENDIF HTML_SECTION%%
21%%IF HTML_CHAPTER%%
22<li><a href="html_chapter/index.html">HTML</a> - with one web page per
23 chapter.</li>
24%%ENDIF HTML_CHAPTER%%
25<li><a href="%%PACKAGE%%.html.gz">HTML compressed
26 (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
27 one web page.</li>
28<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
29 (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
30 with one web page per node.</li>
31%%IF HTML_SECTION%%
32<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
33 (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
34 with one web page per section.</li>
35%%ENDIF HTML_SECTION%%
36%%IF HTML_CHAPTER%%
37<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
38 (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
39 with one web page per chapter.</li>
40%%ENDIF HTML_CHAPTER%%
41<li><a href="%%PACKAGE%%.info.tar.gz">Info document
42 (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
43<li><a href="%%PACKAGE%%.txt">ASCII text
44 (%%ASCII_SIZE%%K bytes)</a>.</li>
45<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
46 (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
47<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
48 (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
49<li><a href="%%PACKAGE%%.pdf">PDF file
50 (%%PDF_SIZE%%K bytes)</a>.</li>
51<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
52 (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
53</ul>
54
55<p>You can <a href="http://shop.fsf.org/">buy printed copies of
56some manuals</a> (among other items) from the Free Software Foundation;
57this helps support FSF activities.</p>
58
59<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
60script</a>.)</p>
61
62<!-- If needed, change the copyright block at the bottom. In general,
63 all pages on the GNU web server should have the section about
64 verbatim copying. Please do NOT remove this without talking
65 with the webmasters first.
66 Please make sure the copyright date is consistent with the document
67 and that it is like this: "2001, 2002", not this: "2001-2002". -->
68</div><!-- for id="content", starts in the include above -->
69<!--#include virtual="/server/footer.html" -->
70<div id="footer">
71<div class="unprintable">
72
73<p>Please send general FSF &amp; GNU inquiries to
74<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
75There are also <a href="/contact/">other ways to contact</a>
76the FSF. Broken links and other corrections or suggestions can be sent
77to <a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
78</div>
79
80<p>Copyright &copy; 2017 Free Software Foundation, Inc.</p>
81
82<p>This page is licensed under a <a rel="license"
83href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
84Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
85
86<!--#include virtual="/server/bottom-notes.html" -->
87
88</div>
89</div>
90</body>
91</html>
diff --git a/doc/gendocs_template_min b/doc/gendocs_template_min
new file mode 100644
index 0000000..112fa3b
--- /dev/null
+++ b/doc/gendocs_template_min
@@ -0,0 +1,93 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
6<head>
7<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
8<meta http-equiv="content-type" content='text/html; charset=utf-8' />
9<link rel="stylesheet" type="text/css" href="/gnu.css" />
10</head>
11
12<body>
13
14<h3>%%TITLE%%</h3>
15
16<address>Free Software Foundation</address>
17<address>last updated %%DATE%%</address>
18<p>
19<a href="/graphics/gnu-head.jpg">
20 <img src="/graphics/gnu-head-sm.jpg"
21 alt=" [image of the head of a GNU] " width="129" height="122"/>
22</a>
23</p>
24<hr />
25
26<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
27
28<ul>
29<li><a href="%%PACKAGE%%.html">HTML
30 (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
31<li><a href="html_node/index.html">HTML</a> - with one web page per
32 node.</li>
33%%IF HTML_SECTION%%
34<li><a href="html_section/index.html">HTML</a> - with one web page per
35 section.</li>
36%%ENDIF HTML_SECTION%%
37%%IF HTML_CHAPTER%%
38<li><a href="html_chapter/index.html">HTML</a> - with one web page per
39 chapter.</li>
40%%ENDIF HTML_CHAPTER%%
41<li><a href="%%PACKAGE%%.html.gz">HTML compressed
42 (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
43 one web page.</li>
44<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
45 (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
46 with one web page per node.</li>
47%%IF HTML_SECTION%%
48<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
49 (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
50 with one web page per section.</li>
51%%ENDIF HTML_SECTION%%
52%%IF HTML_CHAPTER%%
53<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
54 (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
55 with one web page per chapter.</li>
56%%ENDIF HTML_CHAPTER%%
57<li><a href="%%PACKAGE%%.info.tar.gz">Info document
58 (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
59<li><a href="%%PACKAGE%%.txt">ASCII text
60 (%%ASCII_SIZE%%K bytes)</a>.</li>
61<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
62 (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
63<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
64 (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
65<li><a href="%%PACKAGE%%.pdf">PDF file
66 (%%PDF_SIZE%%K bytes)</a>.</li>
67<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
68 (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
69</ul>
70
71<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
72script</a>.)</p>
73
74<div id="footer" class="copyright">
75
76<p>Please send general FSF &amp; GNU inquiries to
77<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
78There are also <a href="/contact/">other ways to contact</a>
79the FSF. Broken links and other corrections or suggestions can be sent
80to <a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
81</div>
82
83<p>Copyright &copy; 2017 Free Software Foundation, Inc.</p>
84
85<p>This page is licensed under a <a rel="license"
86href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
87Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
88
89<!--#include virtual="/server/bottom-notes.html" -->
90
91</div>
92</body>
93</html>
diff --git a/doc/gnunet-guile.texi b/doc/gnunet-guile.texi
new file mode 100644
index 0000000..7e18833
--- /dev/null
+++ b/doc/gnunet-guile.texi
@@ -0,0 +1,132 @@
1\input texinfo
2@c -*-texinfo-*-
3
4@c %**start of header
5@setfilename gnunet-guile.info
6@documentencoding UTF-8
7@settitle GNUnet Guile Reference Manual
8@exampleindent 2
9@urefbreakstyle before
10@c %**end of header
11
12@include version.texi
13
14@copying
15Copyright @copyright{} 2017 GNUnet e.V.
16
17Permission is granted to copy, distribute and/or modify this document
18under the terms of the GNU Free Documentation License, Version 1.3 or
19any later version published by the Free Software Foundation; with no
20Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
21copy of the license is included in the section entitled ``GNU Free
22Documentation License''.
23
24A copy of the license is also available from the Free Software
25Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}.
26
27Alternately, this document is also available under the General
28Public License, version 3 or later, as published by the Free Software
29Foundation. A copy of the license is included in the section entitled
30``GNU General Public License''.
31
32A copy of the license is also available from the Free Software
33Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}.
34@end copying
35
36@dircategory Networking
37@direntry
38* GNUnet-Guile: (gnunet-guile). Guile bindings for GNUnet
39@end direntry
40
41@titlepage
42@title GNUnet Guile Reference Manual
43@subtitle Guile bindings for GNUnet
44@author The GNUnet Developers
45
46@page
47@vskip 0pt plus 1filll
48Edition @value{EDITION} @*
49@value{UPDATED} @*
50
51@insertcopying
52@end titlepage
53
54@summarycontents
55@contents
56
57@node Top
58@top Contributing to GNUnet
59
60
61This document describes GNUnet Guile version @value{VERSION}.
62
63
64GNUnet Guile is a maintained as part of the
65@uref{https://gnunet.org/, GNUnet} project.
66
67All code contributions must thus be put under the
68@uref{https://www.gnu.org/copyleft/gpl.html, GNU Public License (GPL)}.
69All documentation should be put under FSF approved licenses
70(see @uref{https://www.gnu.org/copyleft/fdl.html, fdl}).
71
72By submitting documentation, translations, comments and other
73content to this project you automatically grant the right to publish
74code under the GNU Public License (version 3 or later) and
75documentation under either or both the GNU Public License or the
76GNU Free Documentation License.
77When contributing to the GNUnet Guile project, GNU standards and the
78@uref{https://www.gnu.org/philosophy/philosophy.html, GNU philosophy}
79should be adhered to.
80
81Unlike GNUnet, we require no formal copyright assignments
82for contributions to GNUnet Guile.
83
84@menu
85
86* Introduction:: Introduction
87* Main:: Main
88* GNU Free Documentation License:: The license of this manual.
89* GNU General Public License:: The license of this manual.
90* Concept Index:: Concepts.
91* Programming Index:: Data types, functions, and variables.
92
93@detailmenu
94 --- The Detailed Node Listing ---
95
96Introduction
97
98Main
99
100@end detailmenu
101@end menu
102
103@node Introduction
104@chapter Introduction
105
106@node Main
107@chapter Main
108
109@c *********************************************************************
110@node GNU Free Documentation License
111@appendix GNU Free Documentation License
112@cindex license, GNU Free Documentation License
113@include fdl-1.3.texi
114
115@c *********************************************************************
116@node GNU General Public License
117@appendix GNU General Public License
118@cindex license, GNU General Public License
119@include gpl-3.0.texi
120
121@c *********************************************************************
122@node Concept Index
123@unnumbered Concept Index
124@printindex cp
125
126@node Programming Index
127@unnumbered Programming Index
128@syncodeindex tp fn
129@syncodeindex vr fn
130@printindex fn
131
132@bye
diff --git a/doc/gpl-3.0.texi b/doc/gpl-3.0.texi
new file mode 100644
index 0000000..0e2e212
--- /dev/null
+++ b/doc/gpl-3.0.texi
@@ -0,0 +1,717 @@
1@c The GNU General Public License.
2@center Version 3, 29 June 2007
3
4@c This file is intended to be included within another document,
5@c hence no sectioning command or @node.
6
7@display
8Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
9
10Everyone is permitted to copy and distribute verbatim copies of this
11license document, but changing it is not allowed.
12@end display
13
14@heading Preamble
15
16The GNU General Public License is a free, copyleft license for
17software and other kinds of works.
18
19The licenses for most software and other practical works are designed
20to take away your freedom to share and change the works. By contrast,
21the GNU General Public License is intended to guarantee your freedom
22to share and change all versions of a program---to make sure it remains
23free software for all its users. We, the Free Software Foundation,
24use the GNU General Public License for most of our software; it
25applies also to any other work released this way by its authors. You
26can apply it to your programs, too.
27
28When we speak of free software, we are referring to freedom, not
29price. Our General Public Licenses are designed to make sure that you
30have the freedom to distribute copies of free software (and charge for
31them if you wish), that you receive source code or can get it if you
32want it, that you can change the software or use pieces of it in new
33free programs, and that you know you can do these things.
34
35To protect your rights, we need to prevent others from denying you
36these rights or asking you to surrender the rights. Therefore, you
37have certain responsibilities if you distribute copies of the
38software, or if you modify it: responsibilities to respect the freedom
39of others.
40
41For example, if you distribute copies of such a program, whether
42gratis or for a fee, you must pass on to the recipients the same
43freedoms that you received. You must make sure that they, too,
44receive or can get the source code. And you must show them these
45terms so they know their rights.
46
47Developers that use the GNU GPL protect your rights with two steps:
48(1) assert copyright on the software, and (2) offer you this License
49giving you legal permission to copy, distribute and/or modify it.
50
51For the developers' and authors' protection, the GPL clearly explains
52that there is no warranty for this free software. For both users' and
53authors' sake, the GPL requires that modified versions be marked as
54changed, so that their problems will not be attributed erroneously to
55authors of previous versions.
56
57Some devices are designed to deny users access to install or run
58modified versions of the software inside them, although the
59manufacturer can do so. This is fundamentally incompatible with the
60aim of protecting users' freedom to change the software. The
61systematic pattern of such abuse occurs in the area of products for
62individuals to use, which is precisely where it is most unacceptable.
63Therefore, we have designed this version of the GPL to prohibit the
64practice for those products. If such problems arise substantially in
65other domains, we stand ready to extend this provision to those
66domains in future versions of the GPL, as needed to protect the
67freedom of users.
68
69Finally, every program is threatened constantly by software patents.
70States should not allow patents to restrict development and use of
71software on general-purpose computers, but in those that do, we wish
72to avoid the special danger that patents applied to a free program
73could make it effectively proprietary. To prevent this, the GPL
74assures that patents cannot be used to render the program non-free.
75
76The precise terms and conditions for copying, distribution and
77modification follow.
78
79@heading TERMS AND CONDITIONS
80
81@enumerate 0
82@item Definitions.
83
84``This License'' refers to version 3 of the GNU General Public License.
85
86``Copyright'' also means copyright-like laws that apply to other kinds
87of works, such as semiconductor masks.
88
89``The Program'' refers to any copyrightable work licensed under this
90License. Each licensee is addressed as ``you''. ``Licensees'' and
91``recipients'' may be individuals or organizations.
92
93To ``modify'' a work means to copy from or adapt all or part of the work
94in a fashion requiring copyright permission, other than the making of
95an exact copy. The resulting work is called a ``modified version'' of
96the earlier work or a work ``based on'' the earlier work.
97
98A ``covered work'' means either the unmodified Program or a work based
99on the Program.
100
101To ``propagate'' a work means to do anything with it that, without
102permission, would make you directly or secondarily liable for
103infringement under applicable copyright law, except executing it on a
104computer or modifying a private copy. Propagation includes copying,
105distribution (with or without modification), making available to the
106public, and in some countries other activities as well.
107
108To ``convey'' a work means any kind of propagation that enables other
109parties to make or receive copies. Mere interaction with a user
110through a computer network, with no transfer of a copy, is not
111conveying.
112
113An interactive user interface displays ``Appropriate Legal Notices'' to
114the extent that it includes a convenient and prominently visible
115feature that (1) displays an appropriate copyright notice, and (2)
116tells the user that there is no warranty for the work (except to the
117extent that warranties are provided), that licensees may convey the
118work under this License, and how to view a copy of this License. If
119the interface presents a list of user commands or options, such as a
120menu, a prominent item in the list meets this criterion.
121
122@item Source Code.
123
124The ``source code'' for a work means the preferred form of the work for
125making modifications to it. ``Object code'' means any non-source form
126of a work.
127
128A ``Standard Interface'' means an interface that either is an official
129standard defined by a recognized standards body, or, in the case of
130interfaces specified for a particular programming language, one that
131is widely used among developers working in that language.
132
133The ``System Libraries'' of an executable work include anything, other
134than the work as a whole, that (a) is included in the normal form of
135packaging a Major Component, but which is not part of that Major
136Component, and (b) serves only to enable use of the work with that
137Major Component, or to implement a Standard Interface for which an
138implementation is available to the public in source code form. A
139``Major Component'', in this context, means a major essential component
140(kernel, window system, and so on) of the specific operating system
141(if any) on which the executable work runs, or a compiler used to
142produce the work, or an object code interpreter used to run it.
143
144The ``Corresponding Source'' for a work in object code form means all
145the source code needed to generate, install, and (for an executable
146work) run the object code and to modify the work, including scripts to
147control those activities. However, it does not include the work's
148System Libraries, or general-purpose tools or generally available free
149programs which are used unmodified in performing those activities but
150which are not part of the work. For example, Corresponding Source
151includes interface definition files associated with source files for
152the work, and the source code for shared libraries and dynamically
153linked subprograms that the work is specifically designed to require,
154such as by intimate data communication or control flow between those
155subprograms and other parts of the work.
156
157The Corresponding Source need not include anything that users can
158regenerate automatically from other parts of the Corresponding Source.
159
160The Corresponding Source for a work in source code form is that same
161work.
162
163@item Basic Permissions.
164
165All rights granted under this License are granted for the term of
166copyright on the Program, and are irrevocable provided the stated
167conditions are met. This License explicitly affirms your unlimited
168permission to run the unmodified Program. The output from running a
169covered work is covered by this License only if the output, given its
170content, constitutes a covered work. This License acknowledges your
171rights of fair use or other equivalent, as provided by copyright law.
172
173You may make, run and propagate covered works that you do not convey,
174without conditions so long as your license otherwise remains in force.
175You may convey covered works to others for the sole purpose of having
176them make modifications exclusively for you, or provide you with
177facilities for running those works, provided that you comply with the
178terms of this License in conveying all material for which you do not
179control copyright. Those thus making or running the covered works for
180you must do so exclusively on your behalf, under your direction and
181control, on terms that prohibit them from making any copies of your
182copyrighted material outside their relationship with you.
183
184Conveying under any other circumstances is permitted solely under the
185conditions stated below. Sublicensing is not allowed; section 10
186makes it unnecessary.
187
188@item Protecting Users' Legal Rights From Anti-Circumvention Law.
189
190No covered work shall be deemed part of an effective technological
191measure under any applicable law fulfilling obligations under article
19211 of the WIPO copyright treaty adopted on 20 December 1996, or
193similar laws prohibiting or restricting circumvention of such
194measures.
195
196When you convey a covered work, you waive any legal power to forbid
197circumvention of technological measures to the extent such
198circumvention is effected by exercising rights under this License with
199respect to the covered work, and you disclaim any intention to limit
200operation or modification of the work as a means of enforcing, against
201the work's users, your or third parties' legal rights to forbid
202circumvention of technological measures.
203
204@item Conveying Verbatim Copies.
205
206You may convey verbatim copies of the Program's source code as you
207receive it, in any medium, provided that you conspicuously and
208appropriately publish on each copy an appropriate copyright notice;
209keep intact all notices stating that this License and any
210non-permissive terms added in accord with section 7 apply to the code;
211keep intact all notices of the absence of any warranty; and give all
212recipients a copy of this License along with the Program.
213
214You may charge any price or no price for each copy that you convey,
215and you may offer support or warranty protection for a fee.
216
217@item Conveying Modified Source Versions.
218
219You may convey a work based on the Program, or the modifications to
220produce it from the Program, in the form of source code under the
221terms of section 4, provided that you also meet all of these
222conditions:
223
224@enumerate a
225@item
226The work must carry prominent notices stating that you modified it,
227and giving a relevant date.
228
229@item
230The work must carry prominent notices stating that it is released
231under this License and any conditions added under section 7. This
232requirement modifies the requirement in section 4 to ``keep intact all
233notices''.
234
235@item
236You must license the entire work, as a whole, under this License to
237anyone who comes into possession of a copy. This License will
238therefore apply, along with any applicable section 7 additional terms,
239to the whole of the work, and all its parts, regardless of how they
240are packaged. This License gives no permission to license the work in
241any other way, but it does not invalidate such permission if you have
242separately received it.
243
244@item
245If the work has interactive user interfaces, each must display
246Appropriate Legal Notices; however, if the Program has interactive
247interfaces that do not display Appropriate Legal Notices, your work
248need not make them do so.
249@end enumerate
250
251A compilation of a covered work with other separate and independent
252works, which are not by their nature extensions of the covered work,
253and which are not combined with it such as to form a larger program,
254in or on a volume of a storage or distribution medium, is called an
255``aggregate'' if the compilation and its resulting copyright are not
256used to limit the access or legal rights of the compilation's users
257beyond what the individual works permit. Inclusion of a covered work
258in an aggregate does not cause this License to apply to the other
259parts of the aggregate.
260
261@item Conveying Non-Source Forms.
262
263You may convey a covered work in object code form under the terms of
264sections 4 and 5, provided that you also convey the machine-readable
265Corresponding Source under the terms of this License, in one of these
266ways:
267
268@enumerate a
269@item
270Convey the object code in, or embodied in, a physical product
271(including a physical distribution medium), accompanied by the
272Corresponding Source fixed on a durable physical medium customarily
273used for software interchange.
274
275@item
276Convey the object code in, or embodied in, a physical product
277(including a physical distribution medium), accompanied by a written
278offer, valid for at least three years and valid for as long as you
279offer spare parts or customer support for that product model, to give
280anyone who possesses the object code either (1) a copy of the
281Corresponding Source for all the software in the product that is
282covered by this License, on a durable physical medium customarily used
283for software interchange, for a price no more than your reasonable
284cost of physically performing this conveying of source, or (2) access
285to copy the Corresponding Source from a network server at no charge.
286
287@item
288Convey individual copies of the object code with a copy of the written
289offer to provide the Corresponding Source. This alternative is
290allowed only occasionally and noncommercially, and only if you
291received the object code with such an offer, in accord with subsection
2926b.
293
294@item
295Convey the object code by offering access from a designated place
296(gratis or for a charge), and offer equivalent access to the
297Corresponding Source in the same way through the same place at no
298further charge. You need not require recipients to copy the
299Corresponding Source along with the object code. If the place to copy
300the object code is a network server, the Corresponding Source may be
301on a different server (operated by you or a third party) that supports
302equivalent copying facilities, provided you maintain clear directions
303next to the object code saying where to find the Corresponding Source.
304Regardless of what server hosts the Corresponding Source, you remain
305obligated to ensure that it is available for as long as needed to
306satisfy these requirements.
307
308@item
309Convey the object code using peer-to-peer transmission, provided you
310inform other peers where the object code and Corresponding Source of
311the work are being offered to the general public at no charge under
312subsection 6d.
313
314@end enumerate
315
316A separable portion of the object code, whose source code is excluded
317from the Corresponding Source as a System Library, need not be
318included in conveying the object code work.
319
320A ``User Product'' is either (1) a ``consumer product'', which means any
321tangible personal property which is normally used for personal,
322family, or household purposes, or (2) anything designed or sold for
323incorporation into a dwelling. In determining whether a product is a
324consumer product, doubtful cases shall be resolved in favor of
325coverage. For a particular product received by a particular user,
326``normally used'' refers to a typical or common use of that class of
327product, regardless of the status of the particular user or of the way
328in which the particular user actually uses, or expects or is expected
329to use, the product. A product is a consumer product regardless of
330whether the product has substantial commercial, industrial or
331non-consumer uses, unless such uses represent the only significant
332mode of use of the product.
333
334``Installation Information'' for a User Product means any methods,
335procedures, authorization keys, or other information required to
336install and execute modified versions of a covered work in that User
337Product from a modified version of its Corresponding Source. The
338information must suffice to ensure that the continued functioning of
339the modified object code is in no case prevented or interfered with
340solely because modification has been made.
341
342If you convey an object code work under this section in, or with, or
343specifically for use in, a User Product, and the conveying occurs as
344part of a transaction in which the right of possession and use of the
345User Product is transferred to the recipient in perpetuity or for a
346fixed term (regardless of how the transaction is characterized), the
347Corresponding Source conveyed under this section must be accompanied
348by the Installation Information. But this requirement does not apply
349if neither you nor any third party retains the ability to install
350modified object code on the User Product (for example, the work has
351been installed in ROM).
352
353The requirement to provide Installation Information does not include a
354requirement to continue to provide support service, warranty, or
355updates for a work that has been modified or installed by the
356recipient, or for the User Product in which it has been modified or
357installed. Access to a network may be denied when the modification
358itself materially and adversely affects the operation of the network
359or violates the rules and protocols for communication across the
360network.
361
362Corresponding Source conveyed, and Installation Information provided,
363in accord with this section must be in a format that is publicly
364documented (and with an implementation available to the public in
365source code form), and must require no special password or key for
366unpacking, reading or copying.
367
368@item Additional Terms.
369
370``Additional permissions'' are terms that supplement the terms of this
371License by making exceptions from one or more of its conditions.
372Additional permissions that are applicable to the entire Program shall
373be treated as though they were included in this License, to the extent
374that they are valid under applicable law. If additional permissions
375apply only to part of the Program, that part may be used separately
376under those permissions, but the entire Program remains governed by
377this License without regard to the additional permissions.
378
379When you convey a copy of a covered work, you may at your option
380remove any additional permissions from that copy, or from any part of
381it. (Additional permissions may be written to require their own
382removal in certain cases when you modify the work.) You may place
383additional permissions on material, added by you to a covered work,
384for which you have or can give appropriate copyright permission.
385
386Notwithstanding any other provision of this License, for material you
387add to a covered work, you may (if authorized by the copyright holders
388of that material) supplement the terms of this License with terms:
389
390@enumerate a
391@item
392Disclaiming warranty or limiting liability differently from the terms
393of sections 15 and 16 of this License; or
394
395@item
396Requiring preservation of specified reasonable legal notices or author
397attributions in that material or in the Appropriate Legal Notices
398displayed by works containing it; or
399
400@item
401Prohibiting misrepresentation of the origin of that material, or
402requiring that modified versions of such material be marked in
403reasonable ways as different from the original version; or
404
405@item
406Limiting the use for publicity purposes of names of licensors or
407authors of the material; or
408
409@item
410Declining to grant rights under trademark law for use of some trade
411names, trademarks, or service marks; or
412
413@item
414Requiring indemnification of licensors and authors of that material by
415anyone who conveys the material (or modified versions of it) with
416contractual assumptions of liability to the recipient, for any
417liability that these contractual assumptions directly impose on those
418licensors and authors.
419@end enumerate
420
421All other non-permissive additional terms are considered ``further
422restrictions'' within the meaning of section 10. If the Program as you
423received it, or any part of it, contains a notice stating that it is
424governed by this License along with a term that is a further
425restriction, you may remove that term. If a license document contains
426a further restriction but permits relicensing or conveying under this
427License, you may add to a covered work material governed by the terms
428of that license document, provided that the further restriction does
429not survive such relicensing or conveying.
430
431If you add terms to a covered work in accord with this section, you
432must place, in the relevant source files, a statement of the
433additional terms that apply to those files, or a notice indicating
434where to find the applicable terms.
435
436Additional terms, permissive or non-permissive, may be stated in the
437form of a separately written license, or stated as exceptions; the
438above requirements apply either way.
439
440@item Termination.
441
442You may not propagate or modify a covered work except as expressly
443provided under this License. Any attempt otherwise to propagate or
444modify it is void, and will automatically terminate your rights under
445this License (including any patent licenses granted under the third
446paragraph of section 11).
447
448However, if you cease all violation of this License, then your license
449from a particular copyright holder is reinstated (a) provisionally,
450unless and until the copyright holder explicitly and finally
451terminates your license, and (b) permanently, if the copyright holder
452fails to notify you of the violation by some reasonable means prior to
45360 days after the cessation.
454
455Moreover, your license from a particular copyright holder is
456reinstated permanently if the copyright holder notifies you of the
457violation by some reasonable means, this is the first time you have
458received notice of violation of this License (for any work) from that
459copyright holder, and you cure the violation prior to 30 days after
460your receipt of the notice.
461
462Termination of your rights under this section does not terminate the
463licenses of parties who have received copies or rights from you under
464this License. If your rights have been terminated and not permanently
465reinstated, you do not qualify to receive new licenses for the same
466material under section 10.
467
468@item Acceptance Not Required for Having Copies.
469
470You are not required to accept this License in order to receive or run
471a copy of the Program. Ancillary propagation of a covered work
472occurring solely as a consequence of using peer-to-peer transmission
473to receive a copy likewise does not require acceptance. However,
474nothing other than this License grants you permission to propagate or
475modify any covered work. These actions infringe copyright if you do
476not accept this License. Therefore, by modifying or propagating a
477covered work, you indicate your acceptance of this License to do so.
478
479@item Automatic Licensing of Downstream Recipients.
480
481Each time you convey a covered work, the recipient automatically
482receives a license from the original licensors, to run, modify and
483propagate that work, subject to this License. You are not responsible
484for enforcing compliance by third parties with this License.
485
486An ``entity transaction'' is a transaction transferring control of an
487organization, or substantially all assets of one, or subdividing an
488organization, or merging organizations. If propagation of a covered
489work results from an entity transaction, each party to that
490transaction who receives a copy of the work also receives whatever
491licenses to the work the party's predecessor in interest had or could
492give under the previous paragraph, plus a right to possession of the
493Corresponding Source of the work from the predecessor in interest, if
494the predecessor has it or can get it with reasonable efforts.
495
496You may not impose any further restrictions on the exercise of the
497rights granted or affirmed under this License. For example, you may
498not impose a license fee, royalty, or other charge for exercise of
499rights granted under this License, and you may not initiate litigation
500(including a cross-claim or counterclaim in a lawsuit) alleging that
501any patent claim is infringed by making, using, selling, offering for
502sale, or importing the Program or any portion of it.
503
504@item Patents.
505
506A ``contributor'' is a copyright holder who authorizes use under this
507License of the Program or a work on which the Program is based. The
508work thus licensed is called the contributor's ``contributor version''.
509
510A contributor's ``essential patent claims'' are all patent claims owned
511or controlled by the contributor, whether already acquired or
512hereafter acquired, that would be infringed by some manner, permitted
513by this License, of making, using, or selling its contributor version,
514but do not include claims that would be infringed only as a
515consequence of further modification of the contributor version. For
516purposes of this definition, ``control'' includes the right to grant
517patent sublicenses in a manner consistent with the requirements of
518this License.
519
520Each contributor grants you a non-exclusive, worldwide, royalty-free
521patent license under the contributor's essential patent claims, to
522make, use, sell, offer for sale, import and otherwise run, modify and
523propagate the contents of its contributor version.
524
525In the following three paragraphs, a ``patent license'' is any express
526agreement or commitment, however denominated, not to enforce a patent
527(such as an express permission to practice a patent or covenant not to
528sue for patent infringement). To ``grant'' such a patent license to a
529party means to make such an agreement or commitment not to enforce a
530patent against the party.
531
532If you convey a covered work, knowingly relying on a patent license,
533and the Corresponding Source of the work is not available for anyone
534to copy, free of charge and under the terms of this License, through a
535publicly available network server or other readily accessible means,
536then you must either (1) cause the Corresponding Source to be so
537available, or (2) arrange to deprive yourself of the benefit of the
538patent license for this particular work, or (3) arrange, in a manner
539consistent with the requirements of this License, to extend the patent
540license to downstream recipients. ``Knowingly relying'' means you have
541actual knowledge that, but for the patent license, your conveying the
542covered work in a country, or your recipient's use of the covered work
543in a country, would infringe one or more identifiable patents in that
544country that you have reason to believe are valid.
545
546If, pursuant to or in connection with a single transaction or
547arrangement, you convey, or propagate by procuring conveyance of, a
548covered work, and grant a patent license to some of the parties
549receiving the covered work authorizing them to use, propagate, modify
550or convey a specific copy of the covered work, then the patent license
551you grant is automatically extended to all recipients of the covered
552work and works based on it.
553
554A patent license is ``discriminatory'' if it does not include within the
555scope of its coverage, prohibits the exercise of, or is conditioned on
556the non-exercise of one or more of the rights that are specifically
557granted under this License. You may not convey a covered work if you
558are a party to an arrangement with a third party that is in the
559business of distributing software, under which you make payment to the
560third party based on the extent of your activity of conveying the
561work, and under which the third party grants, to any of the parties
562who would receive the covered work from you, a discriminatory patent
563license (a) in connection with copies of the covered work conveyed by
564you (or copies made from those copies), or (b) primarily for and in
565connection with specific products or compilations that contain the
566covered work, unless you entered into that arrangement, or that patent
567license was granted, prior to 28 March 2007.
568
569Nothing in this License shall be construed as excluding or limiting
570any implied license or other defenses to infringement that may
571otherwise be available to you under applicable patent law.
572
573@item No Surrender of Others' Freedom.
574
575If conditions are imposed on you (whether by court order, agreement or
576otherwise) that contradict the conditions of this License, they do not
577excuse you from the conditions of this License. If you cannot convey
578a covered work so as to satisfy simultaneously your obligations under
579this License and any other pertinent obligations, then as a
580consequence you may not convey it at all. For example, if you agree
581to terms that obligate you to collect a royalty for further conveying
582from those to whom you convey the Program, the only way you could
583satisfy both those terms and this License would be to refrain entirely
584from conveying the Program.
585
586@item Use with the GNU Affero General Public License.
587
588Notwithstanding any other provision of this License, you have
589permission to link or combine any covered work with a work licensed
590under version 3 of the GNU Affero General Public License into a single
591combined work, and to convey the resulting work. The terms of this
592License will continue to apply to the part which is the covered work,
593but the special requirements of the GNU Affero General Public License,
594section 13, concerning interaction through a network will apply to the
595combination as such.
596
597@item Revised Versions of this License.
598
599The Free Software Foundation may publish revised and/or new versions
600of the GNU General Public License from time to time. Such new
601versions will be similar in spirit to the present version, but may
602differ in detail to address new problems or concerns.
603
604Each version is given a distinguishing version number. If the Program
605specifies that a certain numbered version of the GNU General Public
606License ``or any later version'' applies to it, you have the option of
607following the terms and conditions either of that numbered version or
608of any later version published by the Free Software Foundation. If
609the Program does not specify a version number of the GNU General
610Public License, you may choose any version ever published by the Free
611Software Foundation.
612
613If the Program specifies that a proxy can decide which future versions
614of the GNU General Public License can be used, that proxy's public
615statement of acceptance of a version permanently authorizes you to
616choose that version for the Program.
617
618Later license versions may give you additional or different
619permissions. However, no additional obligations are imposed on any
620author or copyright holder as a result of your choosing to follow a
621later version.
622
623@item Disclaimer of Warranty.
624
625THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
626APPLICABLE LAW@. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
627HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
628WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
629LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
630A PARTICULAR PURPOSE@. THE ENTIRE RISK AS TO THE QUALITY AND
631PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE PROGRAM PROVE
632DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
633CORRECTION.
634
635@item Limitation of Liability.
636
637IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
638WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
639CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
640INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
641ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
642NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
643LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
644TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
645PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
646
647@item Interpretation of Sections 15 and 16.
648
649If the disclaimer of warranty and limitation of liability provided
650above cannot be given local legal effect according to their terms,
651reviewing courts shall apply local law that most closely approximates
652an absolute waiver of all civil liability in connection with the
653Program, unless a warranty or assumption of liability accompanies a
654copy of the Program in return for a fee.
655
656@end enumerate
657
658@heading END OF TERMS AND CONDITIONS
659
660@heading How to Apply These Terms to Your New Programs
661
662If you develop a new program, and you want it to be of the greatest
663possible use to the public, the best way to achieve this is to make it
664free software which everyone can redistribute and change under these
665terms.
666
667To do so, attach the following notices to the program. It is safest
668to attach them to the start of each source file to most effectively
669state the exclusion of warranty; and each file should have at least
670the ``copyright'' line and a pointer to where the full notice is found.
671
672@smallexample
673@var{one line to give the program's name and a brief idea of what it does.}
674Copyright (C) @var{year} @var{name of author}
675
676This program is free software: you can redistribute it and/or modify
677it under the terms of the GNU General Public License as published by
678the Free Software Foundation, either version 3 of the License, or (at
679your option) any later version.
680
681This program is distributed in the hope that it will be useful, but
682WITHOUT ANY WARRANTY; without even the implied warranty of
683MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the GNU
684General Public License for more details.
685
686You should have received a copy of the GNU General Public License
687along with this program. If not, see @url{http://www.gnu.org/licenses/}.
688@end smallexample
689
690Also add information on how to contact you by electronic and paper mail.
691
692If the program does terminal interaction, make it output a short
693notice like this when it starts in an interactive mode:
694
695@smallexample
696@var{program} Copyright (C) @var{year} @var{name of author}
697This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
698This is free software, and you are welcome to redistribute it
699under certain conditions; type @samp{show c} for details.
700@end smallexample
701
702The hypothetical commands @samp{show w} and @samp{show c} should show
703the appropriate parts of the General Public License. Of course, your
704program's commands might be different; for a GUI interface, you would
705use an ``about box''.
706
707You should also get your employer (if you work as a programmer) or school,
708if any, to sign a ``copyright disclaimer'' for the program, if necessary.
709For more information on this, and how to apply and follow the GNU GPL, see
710@url{http://www.gnu.org/licenses/}.
711
712The GNU General Public License does not permit incorporating your
713program into proprietary programs. If your program is a subroutine
714library, you may consider it more useful to permit linking proprietary
715applications with the library. If this is what you want to do, use
716the GNU Lesser General Public License instead of this License. But
717first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
diff --git a/doc/htmlxref.cnf b/doc/htmlxref.cnf
new file mode 100644
index 0000000..a4928f6
--- /dev/null
+++ b/doc/htmlxref.cnf
@@ -0,0 +1,668 @@
1# htmlxref.cnf - reference file for free Texinfo manuals on the web.
2# Modified by Ludovic Courtès <ludo@gnu.org> for the GNU Guix manual.
3# Modified by ng0 <ng0@gnunet.org> for the GNUnet manual.
4
5htmlxrefversion=2017-10-26.06; # UTC
6
7# Copyright 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
8#
9# Copying and distribution of this file, with or without modification,
10# are permitted in any medium without royalty provided the copyright
11# notice and this notice are preserved.
12#
13# The latest version of this file is available at
14# http://ftpmirror.gnu.org/texinfo/htmlxref.cnf.
15# Email corrections or additions to bug-texinfo@gnu.org.
16# The primary goal is to list all relevant GNU manuals;
17# other free manuals are also welcome.
18#
19# To be included in this list, a manual must:
20#
21# - have a generic url, e.g., no version numbers;
22# - have a unique file name (e.g., manual identifier), i.e., be related to the
23# package name. Things like "refman" or "tutorial" don't work.
24# - follow the naming convention for nodes described at
25# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html
26# This is what makeinfo and texi2html implement.
27#
28# Unless the above criteria are met, it's not possible to generate
29# reliable cross-manual references.
30#
31# For information on automatically generating all the useful formats for
32# a manual to put on the web, see
33# http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html.
34
35# For people editing this file: when a manual named foo is related to a
36# package named bar, the url should contain a variable reference ${BAR}.
37# Otherwise, the gnumaint scripts have no way of knowing they are
38# associated, and thus gnu.org/manual can't include them.
39
40# shorten references to manuals on www.gnu.org.
41G = https://www.gnu.org
42GS = ${G}/software
43
443dldf mono ${GS}/3dldf/manual/user_ref/3DLDF.html
453dldf node ${GS}/3dldf/manual/user_ref/
46
47alive mono ${GS}/alive/manual/alive.html
48alive node ${GS}/alive/manual/html_node/
49
50anubis chapter ${GS}/anubis/manual/html_chapter/
51anubis section ${GS}/anubis/manual/html_section/
52anubis node ${GS}/anubis/manual/html_node/
53
54artanis mono ${GS}/artanis/manual/artanis.html
55artanis node ${GS}/artanis/manual/html_node/
56
57aspell section http://aspell.net/man-html/index.html
58
59auctex mono ${GS}/auctex/manual/auctex.html
60auctex node ${GS}/auctex/manual/auctex/
61
62autoconf mono ${GS}/autoconf/manual/autoconf.html
63autoconf node ${GS}/autoconf/manual/html_node/
64
65autogen mono ${GS}/autogen/manual/html_mono/autogen.html
66autogen chapter ${GS}/autogen/manual/html_chapter/
67autogen node ${GS}/autoconf/manual/html_node/
68
69automake mono ${GS}/automake/manual/automake.html
70automake node ${GS}/automake/manual/html_node/
71
72avl node http://www.stanford.edu/~blp/avl/libavl.html/
73
74bash mono ${GS}/bash/manual/bash.html
75bash node ${GS}/bash/manual/html_node/
76
77BINUTILS = http://sourceware.org/binutils/docs
78binutils node ${BINUTILS}/binutils/
79 as node ${BINUTILS}/as/
80 bfd node ${BINUTILS}/bfd/
81 gprof node ${BINUTILS}/gprof/
82 ld node ${BINUTILS}/ld/
83
84bison mono ${GS}/bison/manual/bison.html
85bison node ${GS}/bison/manual/html_node/
86
87bpel2owfn mono ${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html
88
89ccd2cue mono ${GS}/ccd2cue/manual/ccd2cue.html
90ccd2cue node ${GS}/ccd2cue/manual/html_node/
91
92cflow mono ${GS}/cflow/manual/cflow.html
93cflow node ${GS}/cflow/manual/html_node/
94
95chess mono ${GS}/chess/manual/gnuchess.html
96chess node ${GS}/chess/manual/html_node/
97
98combine mono ${GS}/combine/manual/combine.html
99combine chapter ${GS}/combine/manual/html_chapter/
100combine section ${GS}/combine/manual/html_section/
101combine node ${GS}/combine/manual/html_node/
102
103complexity mono ${GS}/complexity/manual/complexity.html
104complexity node ${GS}/complexity/manual/html_node/
105
106coreutils mono ${GS}/coreutils/manual/coreutils
107coreutils node ${GS}/coreutils/manual/html_node/
108
109cpio mono ${GS}/cpio/manual/cpio
110cpio node ${GS}/cpio/manual/html_node/
111
112cssc node ${GS}/cssc/manual/
113
114#cvs cannot be handled here; see http://ximbiot.com/cvs/manual.
115
116ddd mono ${GS}/ddd/manual/html_mono/ddd.html
117
118ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html
119
120DICO = http://puszcza.gnu.org.ua/software/dico/manual
121dico mono ${DICO}/dico.html
122dico chapter ${DICO}/html_chapter/
123dico section ${DICO}/html_section/
124dico node ${DICO}/html_node/
125
126diffutils mono ${GS}/diffutils/manual/diffutils
127diffutils node ${GS}/diffutils/manual/html_node/
128
129ed mono ${GS}/ed/manual/ed_manual.html
130
131EMACS = ${GS}/emacs/manual
132emacs mono ${EMACS}/html_mono/emacs.html
133emacs node ${EMACS}/html_node/emacs/
134 #
135 ada-mode mono ${EMACS}/html_mono/ada-mode.html
136 ada-mode node ${EMACS}/html_node/ada-mode/
137 #
138 autotype mono ${EMACS}/html_mono/autotype.html
139 autotype node ${EMACS}/html_node/autotype/
140 #
141 ccmode mono ${EMACS}/html_mono/ccmode.html
142 ccmode node ${EMACS}/html_node/ccmode/
143 #
144 cl mono ${EMACS}/html_mono/cl.html
145 cl node ${EMACS}/html_node/cl/
146 #
147 ebrowse mono ${EMACS}/html_mono/ebrowse.html
148 ebrowse node ${EMACS}/html_node/ebrowse/
149 #
150 ediff mono ${EMACS}/html_mono/ediff.html
151 ediff node ${EMACS}/html_node/ediff/
152 #
153 eieio mono ${EMACS}/html_mono/eieio.html
154 eieio node ${EMACS}/html_node/eieio/
155 #
156 elisp mono ${EMACS}/html_mono/elisp.html
157 elisp node ${EMACS}/html_node/elisp/
158 #
159 epa mono ${EMACS}/html_mono/epa.html
160 epa node ${EMACS}/html_node/epa/
161 #
162 erc mono ${EMACS}/html_mono/erc.html
163 erc node ${EMACS}/html_node/erc/
164 #
165 dired-x mono ${EMACS}/html_mono/dired-x.html
166 dired-x node ${EMACS}/html_node/dired-x/
167 #
168 eshell mono ${EMACS}/html_mono/eshell.html
169 eshell node ${EMACS}/html_node/eshell/
170 #
171 flymake mono ${EMACS}/html_mono/flymake.html
172 flymake node ${EMACS}/html_node/flymake/
173 #
174 gnus mono ${EMACS}/html_mono/gnus.html
175 gnus node ${EMACS}/html_node/gnus/
176 #
177 idlwave mono ${EMACS}/html_mono/idlwave.html
178 idlwave node ${EMACS}/html_node/idlwave/
179 #
180 message mono ${EMACS}/html_mono/message.html
181 message node ${EMACS}/html_node/message/
182 #
183 mh-e mono ${EMACS}/html_mono/mh-e.html
184 mh-e node ${EMACS}/html_node/mh-e/
185 #
186 nxml-mode mono ${EMACS}/html_mono/nxml-mode.html
187 nxml-mode node ${EMACS}/html_node/nxml-mode/
188 #
189 org mono ${EMACS}/html_mono/org.html
190 org node ${EMACS}/html_node/org/
191 #
192 pcl-cvs mono ${EMACS}/html_mono/pcl-cvs.html
193 pcl-cvs node ${EMACS}/html_node/pcl-cvs/
194 #
195 rcirc mono ${EMACS}/html_mono/rcirc.html
196 rcirc node ${EMACS}/html_node/rcirc/
197 #
198 semantic mono ${EMACS}/html_mono/semantic.html
199 semantic node ${EMACS}/html_node/semantic/
200 #
201 smtp mono ${EMACS}/html_mono/smtpmail.html
202 smtp node ${EMACS}/html_node/smtpmail/
203 #
204 speedbar mono ${EMACS}/html_mono/speedbar.html
205 speedbar node ${EMACS}/html_node/speedbar/
206 #
207 tramp mono ${EMACS}/html_mono/tramp.html
208 tramp node ${EMACS}/html_node/tramp/
209 #
210 vip mono ${EMACS}/html_mono/vip.html
211 vip node ${EMACS}/html_node/vip/
212 #
213 viper mono ${EMACS}/html_mono/viper.html
214 viper node ${EMACS}/html_node/viper/
215 #
216 woman mono ${EMACS}/html_mono/woman.html
217 woman node ${EMACS}/html_node/woman/
218 # (end emacs manuals)
219
220easejs mono ${GS}/easejs/manual/easejs.html
221easejs node ${GS}/easejs/manual/
222
223EMACS_GUIX = https://alezost.github.io/guix.el/manual/latest
224emacs-guix mono ${EMACS_GUIX}/emacs-guix.html
225emacs-guix node ${EMACS_GUIX}/html_node/
226
227emacs-muse node ${GS}/emacs-muse/manual/muse.html
228emacs-muse node ${GS}/emacs-muse/manual/html_node/
229
230emms node ${GS}/emms/manual/
231
232# The file is called 'find.info' but the package is 'findutils'.
233find mono ${GS}/findutils/manual/html_mono/find.html
234find node ${GS}/findutils/manual/html_node/find_html
235findutils mono ${GS}/findutils/manual/html_mono/find.html
236findutils node ${GS}/findutils/manual/html_node/find_html
237
238FLEX = http://flex.sourceforge.net
239flex node ${FLEX}/manual/
240
241gama mono ${GS}/gama/manual/gama.html
242gama node ${GS}/gama/manual/html_node/
243
244GAWK = ${GS}/gawk/manual
245gawk mono ${GAWK}/gawk.html
246gawk node ${GAWK}/html_node/
247 gawkinet mono ${GAWK}/gawkinet/gawkinet.html
248 gawkinet node ${GAWK}/gawkinet/html_node/
249
250gcal mono ${GS}/gcal/manual/gcal.html
251gcal node ${GS}/gcal/manual/html_node/
252
253GCC = http://gcc.gnu.org/onlinedocs
254gcc node ${GCC}/gcc/
255 cpp node ${GCC}/cpp/
256 gcj node ${GCC}/gcj/
257 gfortran node ${GCC}/gfortran/
258 gnat_rm node ${GCC}/gnat_rm/
259 gnat_ugn_unw node ${GCC}/gnat_ugn_unw/
260 libgomp node ${GCC}/libgomp/
261 libstdc++ node ${GCC}/libstdc++/
262 #
263 gccint node ${GCC}/gccint/
264 cppinternals node ${GCC}/cppinternals/
265 gfc-internals node ${GCC}/gfc-internals/
266 gnat-style node ${GCC}/gnat-style/
267 libiberty node ${GCC}/libiberty/
268
269GDB = http://sourceware.org/gdb/current/onlinedocs
270gdb node ${GDB}/gdb/
271 stabs node ${GDB}/stabs/
272
273GDBM = http://www.gnu.org.ua/software/gdbm/manual
274gdbm mono ${GDBM}/gdbm.html
275gdbm chapter ${GDBM}/html_chapter/
276gdbm section ${GDBM}/html_section/
277gdbm node ${GDBM}/html_node/
278
279gettext mono ${GS}/gettext/manual/gettext.html
280gettext node ${GS}/gettext/manual/html_node/
281
282gforth node http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/
283
284global mono ${GS}/global/manual/global.html
285
286gmediaserver node ${GS}/gmediaserver/manual/
287
288gmp node http://www.gmplib.org/manual/
289
290gnu-arch node ${GS}/gnu-arch/tutorial/
291
292gnu-c-manual mono ${GS}/gnu-c-manual/gnu-c-manual.html
293
294gnu-crypto node ${GS}/gnu-crypto/manual/
295
296gnubg mono ${GS}/gnubg/manual/gnubg.html
297gnubg node ${GS}/gnubg/manual/html_node/
298
299gnubik mono ${GS}/gnubik/manual/gnubik.html
300gnubik node ${GS}/gnubik/manual/html_node/
301
302gnulib mono ${GS}/gnulib/manual/gnulib.html
303gnulib node ${GS}/gnulib/manual/html_node/
304
305GNUN = ${GS}/trans-coord/manual
306gnun mono ${GNUN}/gnun/gnun.html
307gnun node ${GNUN}/gnun/html_node/
308 web-trans mono ${GNUN}/web-trans/web-trans.html
309 web-trans node ${GNUN}/web-trans/html_node/
310
311GNUNET = https://docs.gnunet.org/manuals
312gnunet node ${GNUNET}/gnunet/
313 gnunet-c-tutorial node ${GNUNET}/gnunet-c-tutorial/
314 gnunet-java-tutorial node ${GNUNET}/gnunet-java-tutorial/
315
316GNUPG = http://www.gnupg.org/documentation/manuals
317gnupg node ${GNUPG}/gnupg/
318 dirmngr node ${GNUPG}/dirmngr/
319 gcrypt node ${GNUPG}/gcrypt/
320 libgcrypt node ${GNUPG}/gcrypt/
321 ksba node ${GNUPG}/ksba/
322 assuan node ${GNUPG}/assuan/
323 gpgme node ${GNUPG}/gpgme/
324
325gnuprologjava node ${GS}/gnuprologjava/manual/
326
327gnuschool mono ${GS}/gnuschool/gnuschool.html
328
329GNUSTANDARDS = ${G}/prep
330 maintain mono ${GNUSTANDARDS}/maintain/maintain.html
331 maintain node ${GNUSTANDARDS}/maintain/html_node/
332 #
333 standards mono ${GNUSTANDARDS}/standards/standards.html
334 standards node ${GNUSTANDARDS}/standards/html_node/
335
336gnutls mono http://gnutls.org/manual/gnutls.html
337gnutls node http://gnutls.org/manual/html_node/
338
339gnutls-guile mono http://gnutls.org/manual/gnutls-guile.html
340gnutls-guile node http://gnutls.org/manual/gnutls-guile/
341
342gperf mono ${GS}/gperf/manual/gperf.html
343gperf node ${GS}/gperf/manual/html_node/
344
345grep mono ${GS}/grep/manual/grep.html
346grep node ${GS}/grep/manual/html_node/
347
348groff node ${GS}/groff/manual/html_node/
349
350GRUB = ${GS}/grub/manual
351 grub mono ${GRUB}/grub.html
352 grub node ${GRUB}/html_node/
353 #
354 multiboot mono ${GRUB}/multiboot/multiboot.html
355 multiboot node ${GRUB}/multiboot/html_node/
356
357gsasl mono ${GS}/gsasl/manual/gsasl.html
358gsasl node ${GS}/gsasl/manual/html_node/
359
360gsl node ${GS}/gsl/manual/html_node/
361
362gsrc mono ${GS}/gsrc/manual/gsrc.html
363gsrc node ${GS}/gsrc/manual/html_node/
364
365gss mono ${GS}/gss/manual/gss.html
366gss node ${GS}/gss/manual/html_node/
367
368gtypist mono ${GS}/gtypist/doc/
369
370guile mono ${GS}/guile/manual/guile.html
371guile node ${GS}/guile/manual/html_node/
372
373guile-avahi mono http://nongnu.org/guile-avahi/doc/guile-avahi.html
374
375GUILE_GNOME = ${GS}/guile-gnome/docs
376 gobject node ${GUILE_GNOME}/gobject/html/
377 glib node ${GUILE_GNOME}/glib/html/
378 atk node ${GUILE_GNOME}/atk/html/
379 pango node ${GUILE_GNOME}/pango/html/
380 pangocairo node ${GUILE_GNOME}/pangocairo/html/
381 gdk node ${GUILE_GNOME}/gdk/html/
382 gtk node ${GUILE_GNOME}/gtk/html/
383 libglade node ${GUILE_GNOME}/libglade/html/
384 gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/
385 libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/
386 gconf node ${GUILE_GNOME}/gconf/html/
387 libgnome node ${GUILE_GNOME}/libgnome/html/
388 libgnomeui node ${GUILE_GNOME}/libgnomeui/html/
389 corba node ${GUILE_GNOME}/corba/html/
390 clutter node ${GUILE_GNOME}/clutter/html/
391 clutter-glx node ${GUILE_GNOME}/clutter-glx/html/
392
393guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/
394
395guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html
396guile-rpc node ${GS}/guile-rpc/manual/html_node/
397
398guix mono ${GS}/guix/manual/guix.html
399guix node ${GS}/guix/manual/html_node/
400
401gv mono ${GS}/gv/manual/gv.html
402gv node ${GS}/gv/manual/html_node/
403
404gzip mono ${GS}/gzip/manual/gzip.html
405gzip node ${GS}/gzip/manual/html_node/
406
407hello mono ${GS}/hello/manual/hello.html
408hello node ${GS}/hello/manual/html_node/
409
410help2man mono ${GS}/help2man/help2man.html
411
412idutils mono ${GS}/idutils/manual/idutils.html
413idutils node ${GS}/idutils/manual/html_node/
414
415inetutils mono ${GS}/inetutils/manual/inetutils.html
416inetutils node ${GS}/inetutils/manual/html_node/
417
418jwhois mono ${GS}/jwhois/manual/jwhois.html
419jwhois node ${GS}/jwhois/manual/html_node/
420
421libc mono ${GS}/libc/manual/html_mono/libc.html
422libc node ${GS}/libc/manual/html_node/
423
424LIBCDIO = ${GS}/libcdio
425 libcdio mono ${LIBCDIO}/libcdio.html
426 cd-text mono ${LIBCDIO}/cd-text-format.html
427
428libextractor mono ${GS}/libextractor/manual/libextractor.html
429libextractor node ${GS}/libextractor/manual/html_node/
430
431libidn mono ${GS}/libidn/manual/libidn.html
432libidn node ${GS}/libidn/manual/html_node/
433
434librejs mono ${GS}/librejs/manual/librejs.html
435librejs node ${GS}/librejs/manual/html_node/
436
437libmatheval mono ${GS}/libmatheval/manual/libmatheval.html
438
439LIBMICROHTTPD = ${GS}/libmicrohttpd
440libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html
441libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/
442 microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html
443
444libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html
445libtasn1 node ${GS}/libtasn1/manual/html_node/
446
447libtool mono ${GS}/libtool/manual/libtool.html
448libtool node ${GS}/libtool/manual/html_node/
449
450lightning mono ${GS}/lightning/manual/lightning.html
451lightning node ${GS}/lightning/manual/html_node/
452
453# The stable/ url redirects immediately, but that's ok.
454# The .html extension is omitted on their web site, but it works if given.
455LILYPOND = http://lilypond.org/doc/stable/Documentation
456 lilypond-internals node ${LILYPOND}/internals/
457 lilypond-learning node ${LILYPOND}/learning/
458 lilypond-notation node ${LILYPOND}/notation/
459 lilypond-snippets node ${LILYPOND}/snippets/
460 lilypond-usage node ${LILYPOND}/usage/
461 lilypond-web node ${LILYPOND}/web/
462 music-glossary node ${LILYPOND}/music-glossary/
463
464liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html
465liquidwar6 node ${GS}/liquidwar6/manual/html_node/
466
467lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
468lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html
469
470LSH = http://www.lysator.liu.se/~nisse/lsh
471 lsh mono ${LSH}/lsh.html
472
473m4 mono ${GS}/m4/manual/m4.html
474m4 node ${GS}/m4/manual/html_node/
475
476mailutils mono ${GS}/mailutils/manual/mailutils.html
477mailutils chapter ${GS}/mailutils/manual/html_chapter/
478mailutils section ${GS}/mailutils/manual/html_section/
479mailutils node ${GS}/mailutils/manual/html_node/
480
481make mono ${GS}/make/manual/make.html
482make node ${GS}/make/manual/html_node/
483
484mcron mono ${GS}/mcron/manual/mcron.html
485mcron node ${GS}/mcron/manual/html_node/
486
487mdk mono ${GS}/mdk/manual/mdk.html
488mdk node ${GS}/mdk/manual/html_node/
489
490METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
491 iwf_mh node ${METAEXCHANGE}/iwf_mh.html
492 scantest node ${METAEXCHANGE}/scantest.html
493
494MIT_SCHEME = ${GS}/mit-scheme/documentation
495 mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/
496 mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/
497 sos node ${MIT_SCHEME}/mit-scheme-sos/
498 mit-scheme-imail node ${MIT_SCHEME}/mit-scheme-imail/
499
500moe mono ${GS}/moe/manual/moe_manual.html
501
502motti node ${GS}/motti/manual/
503
504mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html
505
506mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html
507
508mtools mono ${GS}/mtools/manual/mtools.html
509
510myserver node http://www.myserverproject.net/documentation/
511
512nano mono http://www.nano-editor.org/dist/latest/nano.html
513
514nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html
515
516ocrad mono ${GS}/ocrad/manual/ocrad_manual.html
517
518parted mono ${GS}/parted/manual/parted.html
519parted node ${GS}/parted/manual/html_node/
520
521pascal mono http://www.gnu-pascal.de/gpc/
522
523# can't use pcb since url's contain dates --30nov10
524
525perl mono ${GS}/perl/manual/perldoc-all.html
526
527PIES = http://www.gnu.org.ua/software/pies/manual
528pies mono ${PIES}/pies.html
529pies chapter ${PIES}/html_chapter/
530pies section ${PIES}/html_section/
531pies node ${PIES}/html_node/
532
533plotutils mono ${GS}/plotutils/manual/en/plotutils.html
534plotutils node ${GS}/plotutils/manual/en/html_node/
535
536proxyknife mono ${GS}/proxyknife/manual/proxyknife.html
537proxyknife node ${GS}/proxyknife/manual/html_node/
538
539pspp mono ${GS}/pspp/manual/pspp.html
540pspp node ${GS}/pspp/manual/html_node/
541
542pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html
543pyconfigure node ${GS}/pyconfigure/manual/html_node/
544
545R = http://cran.r-project.org/doc/manuals
546 R-intro mono ${R}/R-intro.html
547 R-lang mono ${R}/R-lang.html
548 R-exts mono ${R}/R-exts.html
549 R-data mono ${R}/R-data.html
550 R-admin mono ${R}/R-admin.html
551 R-ints mono ${R}/R-ints.html
552
553rcs mono ${GS}/rcs/manual/rcs.html
554rcs node ${GS}/rcs/manual/html_node/
555
556READLINE = http://cnswww.cns.cwru.edu/php/chet/readline
557readline mono ${READLINE}/readline.html
558 rluserman mono ${READLINE}/rluserman.html
559 history mono ${READLINE}/history.html
560
561recode mono http://recode.progiciels-bpi.ca/manual/index.html
562
563recutils mono ${GS}/recutils/manual/recutils.html
564recutils node ${GS}/recutils/manual/html_node/
565
566reftex mono ${GS}/auctex/manual/reftex.html
567reftex node ${GS}/auctex/manual/reftex/
568
569remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html
570remotecontrol node ${GS}/remotecontrol/manual/html_node/
571
572rottlog mono ${GS}/rottlog/manual/rottlog.html
573rottlog node ${GS}/rottlog/manual/html_node/
574
575RUSH = http://www.gnu.org.ua/software/rush/manual
576rush mono ${RUSH}/rush.html
577rush chapter ${RUSH}/html_chapter/
578rush section ${RUSH}/html_section/
579rush node ${RUSH}/html_node/
580
581screen mono ${GS}/screen/manual/screen.html
582screen node ${GS}/screen/manual/html_node/
583
584sed mono ${GS}/sed/manual/sed.html
585sed node ${GS}/sed/manual/html_node/
586
587sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html
588sharutils chapter ${GS}/sharutils/manual/html_chapter/
589sharutils node ${GS}/sharutils/manual/html_node/
590
591shepherd mono ${GS}/shepherd/manual/shepherd.html
592shepherd node ${GS}/shepherd/manual/html_node/
593
594# can't use mono files since they have generic names
595SMALLTALK = ${GS}/smalltalk
596smalltalk node ${SMALLTALK}/manual/html_node/
597 smalltalk-base node ${SMALLTALK}/manual-base/html_node/
598 smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/
599
600sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html
601sourceinstall node ${GS}/sourceinstall/manual/html_node/
602
603sqltutor mono ${GS}/sqltutor/manual/sqltutor.html
604sqltutor node ${GS}/sqltutor/manual/html_node/
605
606src-highlite mono ${GS}/src-highlite/source-highlight.html
607
608swbis mono ${GS}/swbis/manual.html
609
610tar mono ${GS}/tar/manual/tar.html
611tar chapter ${GS}/tar/manual/html_chapter/
612tar section ${GS}/tar/manual/html_section/
613tar node ${GS}/autoconf/manual/html_node/
614
615teseq mono ${GS}/teseq/teseq.html
616teseq node ${GS}/teseq/html_node/
617
618TEXINFO = ${GS}/texinfo/manual
619texinfo mono ${TEXINFO}/texinfo/texinfo.html
620texinfo node ${TEXINFO}/texinfo/html_node/
621 #
622 info mono ${TEXINFO}/info/info.html
623 info node ${TEXINFO}/info/html_node/
624 #
625 info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html
626 info-stnd node ${TEXINFO}/info-stnd/html_node/
627
628thales node ${GS}/thales/manual/
629
630units mono ${GS}/units/manual/units.html
631units node ${GS}/units/manual/html_node/
632
633vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html
634vc-dwim node ${GS}/vc-dwim/manual/html_node/
635
636wdiff mono ${GS}/wdiff/manual/wdiff.html
637wdiff node ${GS}/wdiff/manual/html_node/
638
639websocket4j mono ${GS}/websocket4j/manual/websocket4j.html
640websocket4j node ${GS}/websocket4j/manual/html_node/
641
642wget mono ${GS}/wget/manual/wget.html
643wget node ${GS}/wget/manual/html_node/
644
645xboard mono ${GS}/xboard/manual/xboard.html
646xboard node ${GS}/xboard/manual/html_node/
647
648# emacs-page
649# Free TeX-related Texinfo manuals on tug.org.
650
651T = http://tug.org/texinfohtml
652
653dvipng mono ${T}/dvipng.html
654dvips mono ${T}/dvips.html
655eplain mono ${T}/eplain.html
656kpathsea mono ${T}/kpathsea.html
657latex2e mono ${T}/latex2e.html
658tlbuild mono ${T}/tlbuild.html
659web2c mono ${T}/web2c.html
660
661
662# Local Variables:
663# eval: (add-hook 'write-file-hooks 'time-stamp)
664# time-stamp-start: "htmlxrefversion="
665# time-stamp-format: "%:y-%02m-%02d.%02H"
666# time-stamp-time-zone: "UTC"
667# time-stamp-end: "; # UTC"
668# End:
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..dced30b
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,34 @@
1<title>GNUnet - GNUnet Manuals and Handbooks</title>
2<h2>GNUnet - GNUnet Manuals and Handbooks</h2>
3
4<address>GNUnet e.V.</address>
5<address>Fakultät für Informatik -- I8</address>
6<address>Technische Universität München</address>
7<address>Boltzmannstraße 3</address>
8<address>85748 Garching</address>
9<address>GERMANY</address>
10
11<p>The following handbooks and manuals are available:</p>
12
13<ul>
14<li><a href="gnunet-guile/index.html">GNUnet Guile Reference Manual</li>
15</ul>
16
17<div id="footer">
18<div class="unprintable">
19
20<p>Please send general FSF &amp; GNU inquiries to
21<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
22There are also <a href="/contact/">other ways to contact</a>
23the FSF. Broken links and other corrections or suggestions can be sent
24to <a href="mailto:gnunet-developers@gnu.org">&lt;gnunet-developers@gnu.org&gt;</a>.</p>
25</div>
26
27<p>Copyright &copy; 2001 - 2017 GNUnet e.V.</p>
28
29<p>This page is licensed under a FIXME License.</p>
30
31</div>
32</div>
33</body>
34</html>
diff --git a/doc/run-gendocs.sh b/doc/run-gendocs.sh
new file mode 100755
index 0000000..e4976bd
--- /dev/null
+++ b/doc/run-gendocs.sh
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3make version.texi
4./gendocs.sh --email gnunet-developers@gnu.org gnunet-guile "GNUnet Guile Reference Manual" -o "manual/gnunet-guile"
5cp "index.html" manual/
6printf "Success"
diff --git a/download.scm b/download.scm
new file mode 100644
index 0000000..6870463
--- /dev/null
+++ b/download.scm
@@ -0,0 +1,21 @@
1(define-module (download))
2
3(use-modules ((gnunet)))
4
5
6(define %configuration (configuration-create))
7(configuration-load! %configuration "~/src/c/gnunet/p2/p2.conf")
8
9(define %fs-handle #f)
10(define %fs-download #f)
11
12(define (progress info)
13 (pk (fs-progress-info-status info)))
14
15(scheduler-run
16 (lambda ()
17 (set! %fs-handle (fs-start %configuration "guile-gnunet" progress))
18 (set! %fs-download (fs-download-start %fs-handle
19 (string->uri "gnunet://fs/chk/VEY0C80H6F1PSCNYBS0WSBVN95RXBV85SV2TNJP6V4A660YRNEGCCVZWCJV575R62M9P3W8DBNNZ5HST1DWNA1SSF01BB4JGK064438.A4X3ME6MQ10Q5YVX248GM9SXQYT36B0M241R0CBCR2SW44ZHX3BJ4NPXMN297R3H00VEEQZ04JVBAB236RXJB7JA1FZFNJ89A9GJQRG.42957")
20 0
21 #:filename "/tmp/out.jpg"))))
diff --git a/gnunet.scm b/gnunet.scm
new file mode 100644
index 0000000..1c09ad6
--- /dev/null
+++ b/gnunet.scm
@@ -0,0 +1,480 @@
1;;;; -*- mode: Scheme; indent-tabs-mode: nil; fill-column: 80; -*-
2;;;;
3;;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
4;;;;
5;;;; This program is free software: you can redistribute it and/or modify
6;;;; it under the terms of the GNU General Public License as published by
7;;;; the Free Software Foundation, either version 3 of the License, or
8;;;; (at your option) any later version.
9;;;;
10;;;; This program is distributed in the hope that it will be useful,
11;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13;;;; GNU General Public License for more details.
14;;;;
15;;;; You should have received a copy of the GNU General Public License
16;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
17(define-module (gnunet))
18
19(use-modules ((system foreign) #:prefix ffi:))
20(use-modules ((bytestructures guile)))
21
22(use-modules (gnunet config))
23
24
25(define* (dynamic-link* #:optional library-name)
26 (let ((shared-object (if library-name (dynamic-link library-name) (dynamic-link))))
27 (lambda (return-value function-name . arguments)
28 (let ((function (dynamic-func function-name shared-object)))
29 (ffi:pointer->procedure return-value function arguments)))))
30
31;; FIXME: this MUST NOT be public, expose exceptions instead
32(define-public %gnunet-ok 1)
33(define-public %gnunet-system-error -1)
34(define-public %gnunet-yes 1)
35(define-public %gnunet-no 0)
36
37(define (check value . message)
38 "Throw a 'gnunet-error if value is not %gnunet-ok aka. 1"
39 (unless (eq? value %gnunet-ok)
40 (throw 'gnunet-error message)))
41
42(define (check2 value . message)
43 "If value is a %null-pointer throw a 'gnunet-error. Return the value
44otherwise"
45 (if (eq? value ffi:%null-pointer)
46 (throw 'gnunet-error message)
47 value))
48
49;; bytestructures helper
50
51(define (pointer->bytestructure desc pointer)
52 (let ((size (bytestructure-descriptor-size desc)))
53 (let ((bv (ffi:pointer->bytevector pointer size)))
54 (make-bytestructure bv 0 desc))))
55
56;;; gnunet-util bindings, gnunet_util_lib.h
57
58(define util (dynamic-link* %libgnunet-util))
59
60;; common
61
62(define-public %scheduler-priority-keep 0)
63(define-public %scheduler-priority-idle 1)
64(define-public %scheduler-priority-background 2)
65(define-public %scheduler-priority-default 3)
66(define-public %scheduler-priority-high 4)
67(define-public %scheduler-priority-ui 5)
68(define-public %scheduler-priority-urgent 6)
69(define-public %scheduler-priority-shutdown 7)
70;; (define-public %scheduler-priority-count 8)
71
72;; configuration
73
74(define-public configuration-create
75 (let ((func (util '* "GNUNET_CONFIGURATION_create")))
76 (lambda ()
77 "Create a new configuration object"
78 (func))))
79
80(define-public configuration-destroy!
81 (let ((func (util ffi:void "GNUNET_CONFIGURATION_destroy" '*)))
82 (lambda (configuration)
83 "Destroy configuration object"
84 (func configuration))))
85
86(define-public configuration-load!
87 (let ((func (util ffi:int "GNUNET_CONFIGURATION_load" '* '*)))
88 (lambda (configuration filename)
89 "Load configuration. This function will first parse the defaults
90and then parse the specific configuration file to overwrite the
91defaults."
92 (check (func configuration (ffi:string->pointer filename))
93 (format #f "Impossible to load configuration at ~a" filename)))))
94
95;; crypto, gnunet_crypto_lib.h
96
97(define %crypto-ecdsa-public-key (bs:struct `((q-y ,(bs:vector (/ 256 8) uint8)))))
98
99;; scheduler
100
101(define-public %scheduler-reason-none 0)
102(define-public %scheduler-reason-startup 1)
103(define-public %scheduler-reason-shutdown 2)
104(define-public %scheduler-reason-timeout 4)
105(define-public %scheduler-reason-read-ready 8)
106(define-public %scheduler-reason-write-ready 16)
107(define-public %scheduler-reason-prereq-done 32)
108
109(define-public %scheduler-event-type-none 0)
110(define-public %scheduler-event-type-in 1)
111(define-public %scheduler-event-type-out 2)
112(define-public %scheduler-event-type-hup 4)
113(define-public %scheduler-event-type-error 8)
114(define-public %scheduler-event-type-priority 16)
115(define-public %scheduler-event-type-nval 32)
116
117(define-public scheduler-run
118 (let ((func (util ffi:void "GNUNET_SCHEDULER_run" '* '*)))
119 (lambda (thunk)
120 "Initialize and run scheduler. This procedure will return when
121all tasks have completed. On systems with signals, receiving a
122SIGTERM (and other similar signals) will cause
123#GNUNET_SCHEDULER_shutdown to be run after the active task is
124complete. As a result, SIGTERM causes all shutdown tasks to be
125scheduled with reason #GNUNET_SCHEDULER_REASON_SHUTDOWN. (However,
126tasks added afterwards will execute normally!). Note that any
127particular signal will only shut down one scheduler; applications
128should always only create a single scheduler.
129
130THUNK is task to run first (and immediately)"
131 (func (ffi:procedure->pointer ffi:void thunk '()) ffi:%null-pointer))))
132
133(define-public scheduler-add-with-reason-and-priority
134 (let ((func (util ffi:void
135 "GNUNET_SCHEDULER_add_with_reason_and_priority"
136 '*
137 '*
138 ffi:int
139 ffi:int)))
140 (lambda (thunk reason priority)
141 "Continue the current execution with the given function."
142 (func (ffi:procedure->pointer ffi:void thunk '())
143 ffi:%null-pointer
144 reason
145 priority))))
146
147(define-public scheduler-add-shutdown
148 (let ((func (util '* "GNUNET_SCHEDULER_shutdown" '* '*)))
149 (lambda (thunk)
150 "Schedule a new task to be run on shutdown, that is when a
151CTRL-C signal is received, or when #GNUNET_SCHEDULER_shutdown() is
152being invoked.
153
154Return unique task identifier for the job, valid until THUNK is
155started."
156 (func (ffi:procedure->pointer ffi:void thunk '())))))
157
158;; time
159
160(define %time-absolute (bs:struct `((abs-value-us ,uint64))))
161
162(define %time-relative (bs:struct `((rel-value-us ,uint64))))
163
164(define-public time-absolute-get
165 (let ((func (util ffi:uint64 "GNUNET_TIME_absolute_get")))
166 (lambda ()
167 "Return the current time in microseconds"
168 (func))))
169
170;;; gnunet-fs bindings
171
172(define fs (dynamic-link* %libgnunet-fs))
173
174;; uri
175
176(define-public string->uri
177 (let ((func (fs '* "GNUNET_FS_uri_parse" '* '*)))
178 (lambda (string)
179 (func (ffi:string->pointer string) ffi:%null-pointer))))
180
181(define-public uri-destroy
182 (let ((func (fs ffi:void "GNUNET_FS_uri_destroy" '*)))
183 (lambda (uri)
184 "Destroy uri"
185 (func uri))))
186
187(define-public uri-chk-get-file-size
188 (let ((func (fs ffi:uint64 "GNUNET_FS_uri_chk_get_file_size" '*)))
189 (lambda (uri)
190 "Size of file URI refers to"
191 (func uri))))
192
193;; other fs stuff
194
195(define %fs-options-end 0)
196(define %fs-options-download-parallelism 1)
197(define %fs-options-request-parallelism 2)
198
199(define-public %fs-flags-none 0)
200(define-public %fs-flags-persistence 1)
201(define-public %fs-flags-do-probes 2)
202
203(define-public %fs-status-publish-start 0)
204(define-public %fs-status-publish-resume 1)
205(define-public %fs-status-publish-suspend 2)
206(define-public %fs-status-publish-progress 3)
207(define-public %fs-status-publish-error 4)
208(define-public %fs-status-publish-completed 5)
209(define-public %fs-status-publish-stopped 6)
210(define-public %fs-status-download-start 7)
211(define-public %fs-status-download-resume 8)
212(define-public %fs-status-download-suspend 9)
213(define-public %fs-status-download-progress 10)
214(define-public %fs-status-download-error 11)
215(define-public %fs-status-download-completed 12)
216(define-public %fs-status-download-stopped 13)
217(define-public %fs-status-download-active 14)
218(define-public %fs-status-download-inactive 15)
219(define-public %fs-status-download-lost-parent 16)
220(define-public %fs-status-search-start 17)
221(define-public %fs-status-search-resume 18)
222(define-public %fs-status-search-resume-result 19)
223(define-public %fs-status-search-suspend 20)
224(define-public %fs-status-search-result 21)
225(define-public %fs-status-search-result-namespace 22)
226(define-public %fs-status-search-update 23)
227(define-public %fs-status-search-error 24)
228(define-public %fs-status-search-pause 25)
229(define-public %fs-status-search-continued 26)
230(define-public %fs-status-search-result-stopped 27)
231(define-public %fs-status-search-result-suspend 28)
232(define-public %fs-status-search-stopped 29)
233(define-public %fs-status-unindex-start 30)
234(define-public %fs-status-unindex-resume 31)
235(define-public %fs-status-unindex-suspend 32)
236(define-public %fs-status-unindex-progress 33)
237(define-public %fs-status-unindex-error 34)
238(define-public %fs-status-unindex-completed 35)
239(define-public %fs-status-unindex-stopped 36)
240(define-public %fs-status-publish-progress-directory 37)
241
242; progress info struct
243
244(define %fs-progress-info-publish
245 (bs:struct
246 `((publish-context ,uintptr_t)
247 (file-information ,uintptr_t)
248 (client-context ,uintptr_t)
249 (parent-context ,uintptr_t)
250 (filename ,uintptr_t)
251 (size ,uint64)
252 (eta ,%time-relative)
253 (duration ,%time-relative)
254 (completed ,uint64)
255 (anonymity ,uint32)
256 (specifics
257 ,(bs:union `((progress
258 ,(bs:struct `((data ,uintptr_t)
259 (offset ,uint64)
260 (data-length ,uint64)
261 (depth ,unsigned-int))))
262 (progress-directory
263 ,(bs:struct `((completed ,uint64)
264 (total ,uint64)
265 (eta ,%time-relative))))
266 (resume
267 ,(bs:struct `((message ,uintptr_t)
268 (chk-uri ,uintptr_t)
269 (sks-uri ,uintptr_t))))
270 (completed
271 ,(bs:struct `((chk-uri ,uintptr_t)
272 (sks-uri ,uintptr_t))))
273 (error
274 ,(bs:struct `((message ,uintptr_t))))))))))
275
276(define %fs-progress-info-download
277 (bs:struct
278 `((download-context ,uintptr_t)
279 (client-context ,uintptr_t)
280 (parent-context ,uintptr_t)
281 (search-context ,uintptr_t)
282 (uri ,uintptr_t)
283 (filename ,uintptr_t)
284 (size ,uint64)
285 (eta ,%time-relative)
286 (duration ,%time-relative)
287 (completed ,uint64)
288 (anonymity ,uint32)
289 (active? ,int)
290 (specifics
291 ,(bs:union `((progress
292 ,(bs:struct `((data ,uintptr_t)
293 (offset ,uint64)
294 (data-length ,uint64)
295 (block-download-duration ,%time-relative)
296 (depth ,unsigned-int)
297 (respect-offered ,uint32)
298 (number-of-transmissions ,uint32))))
299 (start
300 ,(bs:struct `((meta ,uintptr_t))))
301 (resume
302 ,(bs:struct `((meta ,uintptr_t)
303 (message ,uintptr_t))))
304 (error
305 ,(bs:struct `((message ,uintptr_t))))))))))
306
307(define %fs-progress-info-search
308 (bs:struct
309 `((search-context ,uintptr_t)
310 (client-context ,uintptr_t)
311 (parent-context ,uintptr_t)
312 (query ,uintptr_t)
313 (duration ,%time-relative)
314 (anonymity ,uint32)
315 (specifics
316 ,(bs:union `((result
317 ,(bs:struct `((meta ,uintptr_t)
318 (uri ,uintptr_t)
319 (result ,uintptr_t)
320 (applicability-rank ,uint32))))
321 (resume-result
322 ,(bs:struct `((meta ,uintptr_t)
323 (uri ,uintptr_t)
324 (result ,uintptr_t)
325 (availability-rank ,int32)
326 (availability-certainty ,uint32)
327 (applicability-rank ,uint32))))
328 (update
329 ,(bs:struct `((client-context ,uintptr_t)
330 (meta ,uintptr_t)
331 (uri ,uintptr_t)
332 (availability-rank ,int32)
333 (availability-certainty ,uint32)
334 (applicability-rank ,uint32)
335 (current-probe-time ,%time-relative))))
336 (result-suspend
337 ,(bs:struct `((client-context ,uintptr_t)
338 (meta ,uintptr_t)
339 (uri ,uintptr_t))))
340 (result-stopped
341 ,(bs:struct `((client-context ,uintptr_t)
342 (meta ,uintptr_t)
343 (uri ,uintptr_t))))
344 (resume
345 ,(bs:struct `((message ,uintptr_t)
346 (paused? ,int))))
347 (error
348 ,(bs:struct `((message ,uintptr_t))))
349 (result-namespace
350 ,(bs:struct `((name ,uintptr_t)
351 (root ,uintptr_t)
352 (meta ,uintptr_t)
353 (pseudonym ,%crypto-ecdsa-public-key))))))))))
354
355(define %fs-progress-info-unindex
356 (bs:struct
357 `((unindex-context ,uintptr_t)
358 (client-context ,uintptr_t)
359 (filename ,uintptr_t)
360 (size ,uint64)
361 (eta ,%time-relative)
362 (duration ,%time-relative)
363 (completed ,uint64)
364 (specifics
365 ,(bs:union `((progress
366 ,(bs:struct `((data ,uintptr_t)
367 (offset ,uint64)
368 (data-length ,uint64)
369 (depth ,unsigned-int))))
370 (resume
371 ,(bs:struct `((message ,uintptr_t))))
372 (error
373 ,(bs:struct `((message ,uintptr_t))))))))))
374
375(define-public %fs-progress-info
376 (bs:struct
377 `((value
378 ,(bs:union `((publish ,%fs-progress-info-publish)
379 (download ,%fs-progress-info-download)
380 (search ,%fs-progress-info-search)
381 (unindex ,%fs-progress-info-unindex))))
382 (status ,int)
383 (handle ,uintptr_t))))
384
385(define-public (fs-progress-info-status info)
386 (bytestructure-ref info 'status))
387
388(define (progress-callback-wrapper callback)
389 (lambda (_ info)
390 (callback (pointer->bytestructure %fs-progress-info info))))
391
392(define (procedure->progress-callback callback)
393 (ffi:procedure->pointer ffi:void (progress-callback-wrapper callback) '(* *)))
394
395(define-public fs-start
396 (let ((func (fs '*
397 "GNUNET_FS_start"
398 '* '* '* '* ffi:int ffi:int ffi:unsigned-int ffi:int ffi:unsigned-int ffi:int)))
399 (lambda* (configuration
400 client-name
401 progress-callback
402 #:key
403 (flags %fs-flags-none)
404 (download-parallelism 16)
405 (request-parallelism (* 10 1024)))
406 "Setup a connection to the file-sharing service.
407
408Return a handle to the file-sharing service"
409 (let ((handle
410 (func configuration
411 (ffi:string->pointer client-name)
412 (procedure->progress-callback progress-callback)
413 ffi:%null-pointer ;; callback closure is null
414 ;; because guile can do it
415 flags
416 %fs-options-download-parallelism
417 download-parallelism
418 %fs-options-request-parallelism
419 request-parallelism
420 %fs-options-end
421 )))
422 (check2 handle "Impossible to connect to file-sharing service.")))))
423
424
425(define-public fs-stop
426 (let ((func (fs ffi:void "GNUNET_FS_stop" '*)))
427 (lambda (handle)
428 (func handle))))
429
430(define-public %fs-download-option-none 0)
431(define-public %fs-download-option-loopback-only 1)
432(define-public %fs-download-option-recursive 2)
433(define-public %fs-download-no-temporaries 4)
434(define-public %fs-download-is-probe (ash 1 31))
435
436(define-public fs-download-start
437 (let ((func (fs '*
438 "GNUNET_FS_download_start"
439 '* '* '* '* '* ffi:uint64 ffi:uint64 ffi:uint32 ffi:unsigned-int '* '*)))
440 (lambda* (handle
441 uri
442 anonymity
443 #:key
444 (meta #f)
445 (filename #f)
446 (tempname #f)
447 (offset 0)
448 (length (uri-chk-get-file-size uri))
449 (options %fs-download-option-none)
450 (client-context #f)
451 (parent #f))
452 "Download parts of a file. Note that this will store
453the blocks at the respective offset in the given file. Also, the
454download is still using the blocking of the underlying FS
455encoding. As a result, the download may *write* outside of the
456given boundaries (if offset and length do not match the 32k FS
457block boundaries).
458
459The given range can be used to focus a download towards a
460particular portion of the file (optimization), not to strictly
461limit the download to exactly those bytes.
462
463HANDLE is the handle the file-sharing service. URI is the URI of the
464file (determines what to download); CHK or LOC URI. ANONYMITY defines
465the level of anonymity for the download."
466 (func handle
467 uri
468 (or meta ffi:%null-pointer)
469 (or (and filename (ffi:string->pointer filename)) ffi:%null-pointer)
470 (or (and tempname (ffi:string->pointer tempname)) ffi:%null-pointer)
471 offset
472 length
473 anonymity
474 options
475 (or client-context ffi:%null-pointer)
476 (or parent ffi:%null-pointer)))))
477
478;; gnunet-identity bindings
479
480(define identity (dynamic-link* %libgnunet-identity))
diff --git a/gnunet/config.scm.in b/gnunet/config.scm.in
new file mode 100644
index 0000000..791eba1
--- /dev/null
+++ b/gnunet/config.scm.in
@@ -0,0 +1,25 @@
1;;;; -*- mode: Scheme; indent-tabs-mode: nil; fill-column: 80; -*-
2;;;;
3;;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
4;;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
5;;;;
6;;;; This program is free software: you can redistribute it and/or modify
7;;;; it under the terms of the GNU General Public License as published by
8;;;; the Free Software Foundation, either version 3 of the License, or
9;;;; (at your option) any later version.
10;;;;
11;;;; This program is distributed in the hope that it will be useful,
12;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;;; GNU General Public License for more details.
15;;;;
16;;;; You should have received a copy of the GNU General Public License
17;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnunet config))
20
21(define-public %libgnunet-util "@GNUNETUTIL_LIBDIR@/libgnunetutil")
22
23(define-public %libgnunet-fs "@GNUNETFS_LIBDIR@/libgnunetfs")
24
25(define-public %libgnunet-identity "@GNUNETIDENTITY_LIBDIR@/libgnunetidentity")
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..8d03f71
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,165 @@
1;;; GNUnet-Guile --- Guile bindings for GNUnet.
2;;; Copyright @ 2017, 2018 ng0 <ng0@n0.is>
3;;; Copyright @ 2018 Amriouche Boubekki <amirouche@hypermove.net>
4;;;
5;;; This file is part of GNUnet-Guile.
6;;;
7;;; GNUnet-Guile is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNUnet-Guile is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNUnet-Guile. If not, see <http://www.gnu.org/licenses/>.
19
20(use-modules
21 (ice-9 popen)
22 (ice-9 match)
23 (ice-9 rdelim)
24 (guix packages)
25 (guix build-system gnu)
26 (guix gexp)
27 ((guix build utils) #:select (with-directory-excursion))
28 (guix git-download)
29 (guix utils) ; current-source-directory
30 ;;(gnunet packages gnunet) ; the GUIX_PACKAGE_PATH in gnunet.git
31 (gnu packages)
32 (gnu packages aidc)
33 (gnu packages autotools)
34 (gnu packages backup)
35 (gnu packages base)
36 (gnu packages compression)
37 (gnu packages curl)
38 (gnu packages databases)
39 (gnu packages file)
40 (gnu packages gettext)
41 (gnu packages glib)
42 (gnu packages gnome)
43 (gnu packages gnunet)
44 (gnu packages gnupg)
45 (gnu packages gnuzilla)
46 (gnu packages groff)
47 (gnu packages gstreamer)
48 (gnu packages gtk)
49 (gnu packages guile)
50 (gnu packages image)
51 (gnu packages image-viewers)
52 (gnu packages libidn)
53 (gnu packages libunistring)
54 (gnu packages linux)
55 (gnu packages maths)
56 (gnu packages multiprecision)
57 (gnu packages ncurses)
58 (gnu packages perl)
59 (gnu packages pkg-config)
60 (gnu packages pulseaudio)
61 (gnu packages python)
62 (gnu packages tex)
63 (gnu packages texinfo)
64 (gnu packages tex)
65 (gnu packages tls)
66 (gnu packages upnp)
67 (gnu packages video)
68 (gnu packages web)
69 (gnu packages xiph)
70 ((guix licenses) #:prefix license:))
71
72;; FIXME: Load this from GUIX_PACKAGE_PATH in gnunet.git -> HOW?
73;; Just the way it is commented throws an error.
74;; (define gnunetg-for-guile-gnunet
75;; (package
76;; (inherit gnunetg)
77;; (name "gnunetg-for-guile-gnunet")))
78
79;; TEMP FIX until we have the problem fixed above.
80;; XXX: Bump this when gnunetg in gnunet.git is bumped!
81(define gnunet-git
82 (let* ((commit "477e0dec4d6e9a51af2258611f45adea319ff6ae")
83 (revision "2"))
84 (package
85 (inherit gnunet)
86 (name "gnunet-git")
87 ;; TODO: use git-version
88 (version (string-append "0.10.1" "-" revision
89 "." (string-take commit 7)))
90 (source
91 (origin
92 (method git-fetch)
93 (uri (git-reference
94 (url "https://gnunet.org/git/gnunet.git")
95 (commit commit)))
96 (file-name (string-append name "-" version "-checkout"))
97 (sha256
98 (base32
99 "07p9j0z1ghd50m9g1x1fv94w4x2khli6wn8n2cbjcvycand4fpv5"))))
100 (build-system gnu-build-system)
101 (inputs
102 `(("glpk" ,glpk)
103 ("gnurl" ,gnurl)
104 ("gstreamer" ,gstreamer)
105 ("gst-plugins-base" ,gst-plugins-base)
106 ("gnutls/dane" ,gnutls/dane) ;Change to gnutls/dane once it is merged.
107 ("libextractor" ,libextractor)
108 ("libgcrypt" ,libgcrypt)
109 ("libidn" ,libidn)
110 ("libmicrohttpd" ,libmicrohttpd)
111 ("libltdl" ,libltdl)
112 ("libunistring" ,libunistring)
113 ("openssl" ,openssl)
114 ("opus" ,opus)
115 ("pulseaudio" ,pulseaudio)
116 ("sqlite" ,sqlite)
117 ("postgresql" ,postgresql)
118 ("mysql" ,mysql)
119 ("zlib" ,zlib)
120 ("perl" ,perl)
121 ("python-2" ,python-2) ; tests and gnunet-qr
122 ("jansson" ,jansson)
123 ("nss" ,nss)
124 ("glib" ,glib "bin")
125 ("gmp" ,gmp)
126 ("bluez" ,bluez) ; for optional bluetooth feature
127 ("glib" ,glib)
128 ;; TODO: figure out the right texlive parts.
129 ;;("texlive-minimal" ,texlive-minimal)
130 ("texlive" ,texlive)
131 ("miniupnpc" ,miniupnpc)
132 ("libogg" ,libogg)))
133 (native-inputs
134 `(("pkg-config" ,pkg-config)
135 ("autoconf" ,autoconf)
136 ("automake" ,automake)
137 ("gnu-gettext" ,gnu-gettext)
138 ("which" ,which)
139 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
140 ("libtool" ,libtool)))
141 (outputs '("out" "debug"))
142 (arguments
143 `(#:configure-flags
144 (list (string-append "--with-nssdir=" %output "/lib"))
145 ;; AFAIK not necessary, will also regulary lead to broken
146 ;; GNUnet builds (experimental is what it says)
147 ;; "--enable-experimental")
148 #:parallel-tests? #f ; parallel building is not functional
149 #:tests? #f ; FAIL: test_gnunet_statistics.py
150 #:phases
151 ;; swap check and install phases and set paths to installed bin
152 (modify-phases %standard-phases
153 (add-after 'unpack 'patch-bin-sh
154 (lambda _
155 (substitute* "bootstrap"
156 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
157 (for-each (lambda (f) (chmod f #o755))
158 (find-files "po" ""))
159 #t))
160 (add-after 'patch-bin-sh 'bootstrap
161 (lambda _
162 (zero? (system* "sh" "bootstrap"))))
163 (delete 'check)))))))
164
165gnunet-git
diff --git a/pre-inst-env.in b/pre-inst-env.in
new file mode 100644
index 0000000..20e77c5
--- /dev/null
+++ b/pre-inst-env.in
@@ -0,0 +1,39 @@
1#!/bin/sh
2
3# GNUnet-Guile --- Guile bindings for GNUnet.
4# Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
5#
6# This file is part of GNUnet-Guile.
7#
8# GNUnet-Guile is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 3 of the License, or (at
11# your option) any later version.
12#
13# GNUnet-Guile is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with GNUnet-Guile. If not, see <http://www.gnu.org/licenses/>.
20
21# Usage: ./pre-inst-env COMMAND ARG...
22#
23# Run COMMAND in a pre-installation environment. Typical use is
24# "./pre-inst-env guile".
25
26# By default we may end up with absolute directory names that contain '..',
27# which get into $GUILE_LOAD_PATH, leading to '..' in the module file names
28# recorded by Guile. To avoid that, make sure we get a real absolute
29# directory name. Additionally, use '-P' to get the canonical directory name
30# so that Guile's 'relative' %file-port-name-canonicalization can actually
31# work (see <http://bugs.gnu.org/17935>.)
32abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd -P`"
33abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd -P`"
34
35GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
36GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
37export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
38
39exec "$@"