summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2013-12-16 20:19:19 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-16 20:31:42 +0900
commit241f6ab26f98d37c21c7f75e1a755af78048e92c (patch)
tree2f25d7519f3e667dc63e2d2347706cfe2c865f97
skeleton: initial commit of a skeleton application
-rw-r--r--.gitignore63
-rw-r--r--AUTHORS0
-rw-r--r--COPYING674
-rw-r--r--ChangeLog0
-rw-r--r--GPLv2.txt344
-rw-r--r--INSTALL370
-rw-r--r--Makefile.am93
-rw-r--r--Makefile_Edje_Helper.am9
-rw-r--r--NEWS0
-rw-r--r--README0
-rw-r--r--TODO0
-rwxr-xr-xautogen.sh15
-rw-r--r--configure.ac97
-rw-r--r--data/Makefile.am3
-rw-r--r--data/images/logo.pngbin0 -> 82822 bytes
-rw-r--r--data/themes/Makefile.am4
-rw-r--r--data/themes/default/Makefile.am22
-rw-r--r--data/themes/default/default.edc21
-rw-r--r--data/themes/default/images/enlightenment.pngbin0 -> 2046 bytes
-rw-r--r--data/themes/default/sounds/bell.wavbin0 -> 242396 bytes
-rw-r--r--description1
-rw-r--r--doc/Makefile.am44
-rw-r--r--doc/skeleton.150
-rw-r--r--m4/efl_attribute.m456
-rw-r--r--m4/efl_binary.m479
-rw-r--r--m4/efl_compiler_flag.m457
-rw-r--r--m4/efl_doxygen.m498
-rw-r--r--m4/efl_path_max.m436
-rw-r--r--m4/efl_tests.m465
-rw-r--r--m4/elm_quicklaunch.m424
-rw-r--r--packaging/Makefile.am4
-rw-r--r--packaging/pkgbuild/Makefile.am3
-rw-r--r--packaging/pkgbuild/PKGBUILD60
-rw-r--r--packaging/slackware/Makefile.am4
-rw-r--r--packaging/slackware/doinst.sh1
-rwxr-xr-xpackaging/slackware/skeleton.SlackBuild106
-rw-r--r--packaging/slackware/slack-desc19
-rw-r--r--packaging/slackware/slack-required5
-rw-r--r--po/Makevars41
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/Makefile.am4
-rw-r--r--src/bin/Makefile.am19
-rw-r--r--src/bin/gettext.h280
-rw-r--r--src/bin/skeleton_main.c119
-rw-r--r--src/bin/skeleton_private.h6
-rw-r--r--src/lib/Makefile.am18
-rw-r--r--src/lib/Skeleton.h111
-rw-r--r--src/lib/skeleton.c64
-rw-r--r--src/lib/skeleton_private.h27
-rw-r--r--src/tests/Makefile.am17
-rw-r--r--src/tests/test_skeleton.c124
51 files changed, 3259 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..97f4e33
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,63 @@
1# generated and tmp files
2*~
3*.edj
4*.exe
5*.o
6*.lo
7*.la
8.deps
9*.gcno
10*.gcda
11
12/src/bin/skeleton
13/src/tests/skeleton_tests
14packaging/slackware/skeleton-*.txz
15skeleton-*.tar.?z*
16po/*.gmo
17po/POTFILES
18.libs
19
20# autotools crap
21m4/*.m4
22!m4/efl_*.m4
23Makefile
24Makefile.in
25aclocal.m4
26autom4te.cache
27compile
28config.guess
29config.h
30config.h.in
31config.log
32config.rpath
33config.status
34config.sub
35configure
36depcomp
37install-sh
38libtool
39ltmain.sh
40missing
41stamp-h1
42ar-lib
43test-driver
44test-suite.log
45
46# gettext crap
47ABOUT-NLS
48po/Makefile.in.in
49po/Makevars.template
50po/Rules-quot
51po/boldquot.sed
52po/en@boldquot.header
53po/en@quot.header
54po/insert-header.sin
55po/quot.sed
56po/remove-potcdate.sed
57po/remove-potcdate.sin
58po/stamp-po
59
60/coverage/
61/src/tests/skeleton_tests.*
62/src/tests/test-suite.log
63/src/tests/check-results.xml
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/AUTHORS
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/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/GPLv2.txt b/GPLv2.txt
new file mode 100644
index 0000000..44414e0
--- /dev/null
+++ b/GPLv2.txt
@@ -0,0 +1,344 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59---
60
61 GNU GENERAL PUBLIC LICENSE
62 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
63
64 0. This License applies to any program or other work which contains
65a notice placed by the copyright holder saying it may be distributed
66under the terms of this General Public License. The `Program', below,
67refers to any such program or work, and a `work based on the Program'
68means either the Program or any derivative work under copyright law:
69that is to say, a work containing the Program or a portion of it,
70either verbatim or with modifications and/or translated into another
71language. (Hereinafter, translation is included without limitation in
72the term `modification'.) Each licensee is addressed as `you'.
73
74Activities other than copying, distribution and modification are not
75covered by this License; they are outside its scope. The act of
76running the Program is not restricted, and the output from the Program
77is covered only if its contents constitute a work based on the
78Program (independent of having been made by running the Program).
79Whether that is true depends on what the Program does.
80
81 1. You may copy and distribute verbatim copies of the Program's
82source code as you receive it, in any medium, provided that you
83conspicuously and appropriately publish on each copy an appropriate
84copyright notice and disclaimer of warranty; keep intact all the
85notices that refer to this License and to the absence of any warranty;
86and give any other recipients of the Program a copy of this License
87along with the Program.
88
89You may charge a fee for the physical act of transferring a copy, and
90you may at your option offer warranty protection in exchange for a fee.
91
92 2. You may modify your copy or copies of the Program or any portion
93of it, thus forming a work based on the Program, and copy and
94distribute such modifications or work under the terms of Section 1
95above, provided that you also meet all of these conditions:
96
97 a) You must cause the modified files to carry prominent notices
98 stating that you changed the files and the date of any change.
99
100 b) You must cause any work that you distribute or publish, that in
101 whole or in part contains or is derived from the Program or any
102 part thereof, to be licensed as a whole at no charge to all third
103 parties under the terms of this License.
104
105 c) If the modified program normally reads commands interactively
106 when run, you must cause it, when started running for such
107 interactive use in the most ordinary way, to print or display an
108 announcement including an appropriate copyright notice and a
109 notice that there is no warranty (or else, saying that you provide
110 a warranty) and that users may redistribute the program under
111 these conditions, and telling the user how to view a copy of this
112 License. (Exception: if the Program itself is interactive but
113 does not normally print such an announcement, your work based on
114 the Program is not required to print an announcement.)
115
116These requirements apply to the modified work as a whole. If
117identifiable sections of that work are not derived from the Program,
118and can be reasonably considered independent and separate works in
119themselves, then this License, and its terms, do not apply to those
120sections when you distribute them as separate works. But when you
121distribute the same sections as part of a whole which is a work based
122on the Program, the distribution of the whole must be on the terms of
123this License, whose permissions for other licensees extend to the
124entire whole, and thus to each and every part regardless of who wrote it.
125
126Thus, it is not the intent of this section to claim rights or contest
127your rights to work written entirely by you; rather, the intent is to
128exercise the right to control the distribution of derivative or
129collective works based on the Program.
130
131In addition, mere aggregation of another work not based on the Program
132with the Program (or with a work based on the Program) on a volume of
133a storage or distribution medium does not bring the other work under
134the scope of this License.
135
136 3. You may copy and distribute the Program (or a work based on it,
137under Section 2) in object code or executable form under the terms of
138Sections 1 and 2 above provided that you also do one of the following:
139
140 a) Accompany it with the complete corresponding machine-readable
141 source code, which must be distributed under the terms of Sections
142 1 and 2 above on a medium customarily used for software interchange; or,
143
144 b) Accompany it with a written offer, valid for at least three
145 years, to give any third party, for a charge no more than your
146 cost of physically performing source distribution, a complete
147 machine-readable copy of the corresponding source code, to be
148 distributed under the terms of Sections 1 and 2 above on a medium
149 customarily used for software interchange; or,
150
151 c) Accompany it with the information you received as to the offer
152 to distribute corresponding source code. (This alternative is
153 allowed only for noncommercial distribution and only if you
154 received the program in object code or executable form with such
155 an offer, in accord with Subsection b above.)
156
157The source code for a work means the preferred form of the work for
158making modifications to it. For an executable work, complete source
159code means all the source code for all modules it contains, plus any
160associated interface definition files, plus the scripts used to
161control compilation and installation of the executable. However, as a
162special exception, the source code distributed need not include
163anything that is normally distributed (in either source or binary
164form) with the major components (compiler, kernel, and so on) of the
165operating system on which the executable runs, unless that component
166itself accompanies the executable.
167
168If distribution of executable or object code is made by offering
169access to copy from a designated place, then offering equivalent
170access to copy the source code from the same place counts as
171distribution of the source code, even though third parties are not
172compelled to copy the source along with the object code.
173
174 4. You may not copy, modify, sublicense, or distribute the Program
175except as expressly provided under this License. Any attempt
176otherwise to copy, modify, sublicense or distribute the Program is
177void, and will automatically terminate your rights under this License.
178However, parties who have received copies, or rights, from you under
179this License will not have their licenses terminated so long as such
180parties remain in full compliance.
181
182 5. You are not required to accept this License, since you have not
183signed it. However, nothing else grants you permission to modify or
184distribute the Program or its derivative works. These actions are
185prohibited by law if you do not accept this License. Therefore, by
186modifying or distributing the Program (or any work based on the
187Program), you indicate your acceptance of this License to do so, and
188all its terms and conditions for copying, distributing or modifying
189the Program or works based on it.
190
191 6. Each time you redistribute the Program (or any work based on the
192Program), the recipient automatically receives a license from the
193original licensor to copy, distribute or modify the Program subject to
194these terms and conditions. You may not impose any further
195restrictions on the recipients' exercise of the rights granted herein.
196You are not responsible for enforcing compliance by third parties to
197this License.
198
199 7. If, as a consequence of a court judgment or allegation of patent
200infringement or for any other reason (not limited to patent issues),
201conditions are imposed on you (whether by court order, agreement or
202otherwise) that contradict the conditions of this License, they do not
203excuse you from the conditions of this License. If you cannot
204distribute so as to satisfy simultaneously your obligations under this
205License and any other pertinent obligations, then as a consequence you
206may not distribute the Program at all. For example, if a patent
207license would not permit royalty-free redistribution of the Program by
208all those who receive copies directly or indirectly through you, then
209the only way you could satisfy both it and this License would be to
210refrain entirely from distribution of the Program.
211
212If any portion of this section is held invalid or unenforceable under
213any particular circumstance, the balance of the section is intended to
214apply and the section as a whole is intended to apply in other
215circumstances.
216
217It is not the purpose of this section to induce you to infringe any
218patents or other property right claims or to contest validity of any
219such claims; this section has the sole purpose of protecting the
220integrity of the free software distribution system, which is
221implemented by public license practices. Many people have made
222generous contributions to the wide range of software distributed
223through that system in reliance on consistent application of that
224system; it is up to the author/donor to decide if he or she is willing
225to distribute software through any other system and a licensee cannot
226impose that choice.
227
228This section is intended to make thoroughly clear what is believed to
229be a consequence of the rest of this License.
230
231 8. If the distribution and/or use of the Program is restricted in
232certain countries either by patents or by copyrighted interfaces, the
233original copyright holder who places the Program under this License
234may add an explicit geographical distribution limitation excluding
235those countries, so that distribution is permitted only in or among
236countries not thus excluded. In such case, this License incorporates
237the limitation as if written in the body of this License.
238
239 9. The Free Software Foundation may publish revised and/or new versions
240of the General Public License from time to time. Such new versions will
241be similar in spirit to the present version, but may differ in detail to
242address new problems or concerns.
243
244Each version is given a distinguishing version number. If the Program
245specifies a version number of this License which applies to it and `any
246later version', you have the option of following the terms and conditions
247either of that version or of any later version published by the Free
248Software Foundation. If the Program does not specify a version number of
249this License, you may choose any version ever published by the Free Software
250Foundation.
251
252 10. If you wish to incorporate parts of the Program into other free
253programs whose distribution conditions are different, write to the author
254to ask for permission. For software which is copyrighted by the Free
255Software Foundation, write to the Free Software Foundation; we sometimes
256make exceptions for this. Our decision will be guided by the two goals
257of preserving the free status of all derivatives of our free software and
258of promoting the sharing and reuse of software generally.
259
260 NO WARRANTY
261
262 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
263FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
264OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
265PROVIDE THE PROGRAM `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
266OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
267MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
268TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
269PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
270REPAIR OR CORRECTION.
271
272 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
273WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
274REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
275INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
276OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
277TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
278YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
279PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
280POSSIBILITY OF SUCH DAMAGES.
281
282 END OF TERMS AND CONDITIONS
283
284---
285
286 How to Apply These Terms to Your New Programs
287
288 If you develop a new program, and you want it to be of the greatest
289possible use to the public, the best way to achieve this is to make it
290free software which everyone can redistribute and change under these terms.
291
292 To do so, attach the following notices to the program. It is safest
293to attach them to the start of each source file to most effectively
294convey the exclusion of warranty; and each file should have at least
295the `copyright' line and a pointer to where the full notice is found.
296
297 (one line to give the program's name and a brief idea of what it does.)
298 Copyright (C) (year) (name of author)
299
300 This program is free software; you can redistribute it and/or modify
301 it under the terms of the GNU General Public License as published by
302 the Free Software Foundation; either version 2 of the License, or
303 (at your option) any later version.
304
305 This program is distributed in the hope that it will be useful,
306 but WITHOUT ANY WARRANTY; without even the implied warranty of
307 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
308 GNU General Public License for more details.
309
310 You should have received a copy of the GNU General Public License
311 along with this program; if not, write to the Free Software
312 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
313
314
315Also add information on how to contact you by electronic and paper mail.
316
317If the program is interactive, make it output a short notice like this
318when it starts in an interactive mode:
319
320 Gnomovision version 69, Copyright (C) year name of author
321 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
322 This is free software, and you are welcome to redistribute it
323 under certain conditions; type `show c' for details.
324
325The hypothetical commands `show w' and `show c' should show the appropriate
326parts of the General Public License. Of course, the commands you use may
327be called something other than `show w' and `show c'; they could even be
328mouse-clicks or menu items--whatever suits your program.
329
330You should also get your employer (if you work as a programmer) or your
331school, if any, to sign a `copyright disclaimer' for the program, if
332necessary. Here is a sample; alter the names:
333
334 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
335 `Gnomovision' (which makes passes at compilers) written by James Hacker.
336
337 (signature of Ty Coon), 1 April 1989
338 Ty Coon, President of Vice
339
340This General Public License does not permit incorporating your program into
341proprietary programs. If your program is a subroutine library, you may
342consider it more useful to permit linking proprietary applications with the
343library. If this is what you want to do, use the GNU Library General
344Public License instead of this License.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..007e939
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
5Inc.
6
7 Copying and distribution of this file, with or without modification,
8are permitted in any medium without royalty provided the copyright
9notice and this notice are preserved. This file is offered as-is,
10without warranty of any kind.
11
12Basic Installation
13==================
14
15 Briefly, the shell commands `./configure; make; make install' should
16configure, build, and install this package. The following
17more-detailed instructions are generic; see the `README' file for
18instructions specific to this package. Some packages provide this
19`INSTALL' file but do not implement all of the features documented
20below. The lack of an optional feature in a given package is not
21necessarily a bug. More recommendations for GNU packages can be found
22in *note Makefile Conventions: (standards)Makefile Conventions.
23
24 The `configure' shell script attempts to guess correct values for
25various system-dependent variables used during compilation. It uses
26those values to create a `Makefile' in each directory of the package.
27It may also create one or more `.h' files containing system-dependent
28definitions. Finally, it creates a shell script `config.status' that
29you can run in the future to recreate the current configuration, and a
30file `config.log' containing compiler output (useful mainly for
31debugging `configure').
32
33 It can also use an optional file (typically called `config.cache'
34and enabled with `--cache-file=config.cache' or simply `-C') that saves
35the results of its tests to speed up reconfiguring. Caching is
36disabled by default to prevent problems with accidental use of stale
37cache files.
38
39 If you need to do unusual things to compile the package, please try
40to figure out how `configure' could check whether to do them, and mail
41diffs or instructions to the address given in the `README' so they can
42be considered for the next release. If you are using the cache, and at
43some point `config.cache' contains results you don't want to keep, you
44may remove or edit it.
45
46 The file `configure.ac' (or `configure.in') is used to create
47`configure' by a program called `autoconf'. You need `configure.ac' if
48you want to change it or regenerate `configure' using a newer version
49of `autoconf'.
50
51 The simplest way to compile this package is:
52
53 1. `cd' to the directory containing the package's source code and type
54 `./configure' to configure the package for your system.
55
56 Running `configure' might take a while. While running, it prints
57 some messages telling which features it is checking for.
58
59 2. Type `make' to compile the package.
60
61 3. Optionally, type `make check' to run any self-tests that come with
62 the package, generally using the just-built uninstalled binaries.
63
64 4. Type `make install' to install the programs and any data files and
65 documentation. When installing into a prefix owned by root, it is
66 recommended that the package be configured and built as a regular
67 user, and only the `make install' phase executed with root
68 privileges.
69
70 5. Optionally, type `make installcheck' to repeat any self-tests, but
71 this time using the binaries in their final installed location.
72 This target does not install anything. Running this target as a
73 regular user, particularly if the prior `make install' required
74 root privileges, verifies that the installation completed
75 correctly.
76
77 6. You can remove the program binaries and object files from the
78 source code directory by typing `make clean'. To also remove the
79 files that `configure' created (so you can compile the package for
80 a different kind of computer), type `make distclean'. There is
81 also a `make maintainer-clean' target, but that is intended mainly
82 for the package's developers. If you use it, you may have to get
83 all sorts of other programs in order to regenerate files that came
84 with the distribution.
85
86 7. Often, you can also type `make uninstall' to remove the installed
87 files again. In practice, not all packages have tested that
88 uninstallation works correctly, even though it is required by the
89 GNU Coding Standards.
90
91 8. Some packages, particularly those that use Automake, provide `make
92 distcheck', which can by used by developers to test that all other
93 targets like `make install' and `make uninstall' work correctly.
94 This target is generally not run by end users.
95
96Compilers and Options
97=====================
98
99 Some systems require unusual options for compilation or linking that
100the `configure' script does not know about. Run `./configure --help'
101for details on some of the pertinent environment variables.
102
103 You can give `configure' initial values for configuration parameters
104by setting variables in the command line or in the environment. Here
105is an example:
106
107 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108
109 *Note Defining Variables::, for more details.
110
111Compiling For Multiple Architectures
112====================================
113
114 You can compile the package for more than one kind of computer at the
115same time, by placing the object files for each architecture in their
116own directory. To do this, you can use GNU `make'. `cd' to the
117directory where you want the object files and executables to go and run
118the `configure' script. `configure' automatically checks for the
119source code in the directory that `configure' is in and in `..'. This
120is known as a "VPATH" build.
121
122 With a non-GNU `make', it is safer to compile the package for one
123architecture at a time in the source code directory. After you have
124installed the package for one architecture, use `make distclean' before
125reconfiguring for another architecture.
126
127 On MacOS X 10.5 and later systems, you can create libraries and
128executables that work on multiple system types--known as "fat" or
129"universal" binaries--by specifying multiple `-arch' options to the
130compiler but only a single `-arch' option to the preprocessor. Like
131this:
132
133 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135 CPP="gcc -E" CXXCPP="g++ -E"
136
137 This is not guaranteed to produce working output in all cases, you
138may have to build one architecture at a time and combine the results
139using the `lipo' tool if you have problems.
140
141Installation Names
142==================
143
144 By default, `make install' installs the package's commands under
145`/usr/local/bin', include files under `/usr/local/include', etc. You
146can specify an installation prefix other than `/usr/local' by giving
147`configure' the option `--prefix=PREFIX', where PREFIX must be an
148absolute file name.
149
150 You can specify separate installation prefixes for
151architecture-specific files and architecture-independent files. If you
152pass the option `--exec-prefix=PREFIX' to `configure', the package uses
153PREFIX as the prefix for installing programs and libraries.
154Documentation and other data files still use the regular prefix.
155
156 In addition, if you use an unusual directory layout you can give
157options like `--bindir=DIR' to specify different values for particular
158kinds of files. Run `configure --help' for a list of the directories
159you can set and what kinds of files go in them. In general, the
160default for these options is expressed in terms of `${prefix}', so that
161specifying just `--prefix' will affect all of the other directory
162specifications that were not explicitly provided.
163
164 The most portable way to affect installation locations is to pass the
165correct locations to `configure'; however, many packages provide one or
166both of the following shortcuts of passing variable assignments to the
167`make install' command line to change installation locations without
168having to reconfigure or recompile.
169
170 The first method involves providing an override variable for each
171affected directory. For example, `make install
172prefix=/alternate/directory' will choose an alternate location for all
173directory configuration variables that were expressed in terms of
174`${prefix}'. Any directories that were specified during `configure',
175but not in terms of `${prefix}', must each be overridden at install
176time for the entire installation to be relocated. The approach of
177makefile variable overrides for each directory variable is required by
178the GNU Coding Standards, and ideally causes no recompilation.
179However, some platforms have known limitations with the semantics of
180shared libraries that end up requiring recompilation when using this
181method, particularly noticeable in packages that use GNU Libtool.
182
183 The second method involves providing the `DESTDIR' variable. For
184example, `make install DESTDIR=/alternate/directory' will prepend
185`/alternate/directory' before all installation names. The approach of
186`DESTDIR' overrides is not required by the GNU Coding Standards, and
187does not work on platforms that have drive letters. On the other hand,
188it does better at avoiding recompilation issues, and works well even
189when some directory options were not specified in terms of `${prefix}'
190at `configure' time.
191
192Optional Features
193=================
194
195 If the package supports it, you can cause programs to be installed
196with an extra prefix or suffix on their names by giving `configure' the
197option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198
199 Some packages pay attention to `--enable-FEATURE' options to
200`configure', where FEATURE indicates an optional part of the package.
201They may also pay attention to `--with-PACKAGE' options, where PACKAGE
202is something like `gnu-as' or `x' (for the X Window System). The
203`README' should mention any `--enable-' and `--with-' options that the
204package recognizes.
205
206 For packages that use the X Window System, `configure' can usually
207find the X include and library files automatically, but if it doesn't,
208you can use the `configure' options `--x-includes=DIR' and
209`--x-libraries=DIR' to specify their locations.
210
211 Some packages offer the ability to configure how verbose the
212execution of `make' will be. For these packages, running `./configure
213--enable-silent-rules' sets the default to minimal output, which can be
214overridden with `make V=1'; while running `./configure
215--disable-silent-rules' sets the default to verbose, which can be
216overridden with `make V=0'.
217
218Particular systems
219==================
220
221 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
222CC is not installed, it is recommended to use the following options in
223order to use an ANSI C compiler:
224
225 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226
227and if that doesn't work, install pre-built binaries of GCC for HP-UX.
228
229 HP-UX `make' updates targets which have the same time stamps as
230their prerequisites, which makes it generally unusable when shipped
231generated files such as `configure' are involved. Use GNU `make'
232instead.
233
234 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235parse its `<wchar.h>' header file. The option `-nodtk' can be used as
236a workaround. If GNU CC is not installed, it is therefore recommended
237to try
238
239 ./configure CC="cc"
240
241and if that doesn't work, try
242
243 ./configure CC="cc -nodtk"
244
245 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
246directory contains several dysfunctional programs; working variants of
247these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
248in your `PATH', put it _after_ `/usr/bin'.
249
250 On Haiku, software installed for all users goes in `/boot/common',
251not `/usr/local'. It is recommended to use the following options:
252
253 ./configure --prefix=/boot/common
254
255Specifying the System Type
256==========================
257
258 There may be some features `configure' cannot figure out
259automatically, but needs to determine by the type of machine the package
260will run on. Usually, assuming the package is built to be run on the
261_same_ architectures, `configure' can figure that out, but if it prints
262a message saying it cannot guess the machine type, give it the
263`--build=TYPE' option. TYPE can either be a short name for the system
264type, such as `sun4', or a canonical name which has the form:
265
266 CPU-COMPANY-SYSTEM
267
268where SYSTEM can have one of these forms:
269
270 OS
271 KERNEL-OS
272
273 See the file `config.sub' for the possible values of each field. If
274`config.sub' isn't included in this package, then this package doesn't
275need to know the machine type.
276
277 If you are _building_ compiler tools for cross-compiling, you should
278use the option `--target=TYPE' to select the type of system they will
279produce code for.
280
281 If you want to _use_ a cross compiler, that generates code for a
282platform different from the build platform, you should specify the
283"host" platform (i.e., that on which the generated programs will
284eventually be run) with `--host=TYPE'.
285
286Sharing Defaults
287================
288
289 If you want to set default values for `configure' scripts to share,
290you can create a site shell script called `config.site' that gives
291default values for variables like `CC', `cache_file', and `prefix'.
292`configure' looks for `PREFIX/share/config.site' if it exists, then
293`PREFIX/etc/config.site' if it exists. Or, you can set the
294`CONFIG_SITE' environment variable to the location of the site script.
295A warning: not all `configure' scripts look for a site script.
296
297Defining Variables
298==================
299
300 Variables not defined in a site shell script can be set in the
301environment passed to `configure'. However, some packages may run
302configure again during the build, and the customized values of these
303variables may be lost. In order to avoid this problem, you should set
304them in the `configure' command line, using `VAR=value'. For example:
305
306 ./configure CC=/usr/local2/bin/gcc
307
308causes the specified `gcc' to be used as the C compiler (unless it is
309overridden in the site shell script).
310
311Unfortunately, this technique does not work for `CONFIG_SHELL' due to
312an Autoconf limitation. Until the limitation is lifted, you can use
313this workaround:
314
315 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
316
317`configure' Invocation
318======================
319
320 `configure' recognizes the following options to control how it
321operates.
322
323`--help'
324`-h'
325 Print a summary of all of the options to `configure', and exit.
326
327`--help=short'
328`--help=recursive'
329 Print a summary of the options unique to this package's
330 `configure', and exit. The `short' variant lists options used
331 only in the top level, while the `recursive' variant lists options
332 also present in any nested packages.
333
334`--version'
335`-V'
336 Print the version of Autoconf used to generate the `configure'
337 script, and exit.
338
339`--cache-file=FILE'
340 Enable the cache: use and save the results of the tests in FILE,
341 traditionally `config.cache'. FILE defaults to `/dev/null' to
342 disable caching.
343
344`--config-cache'
345`-C'
346 Alias for `--cache-file=config.cache'.
347
348`--quiet'
349`--silent'
350`-q'
351 Do not print messages saying which checks are being made. To
352 suppress all normal output, redirect it to `/dev/null' (any error
353 messages will still be shown).
354
355`--srcdir=DIR'
356 Look for the package's source code in directory DIR. Usually
357 `configure' can determine that directory automatically.
358
359`--prefix=DIR'
360 Use DIR as the installation prefix. *note Installation Names::
361 for more details, including other options available for fine-tuning
362 the installation locations.
363
364`--no-create'
365`-n'
366 Run the configure checks, but stop before creating any output
367 files.
368
369`configure' also accepts some other, not widely useful, options. Run
370`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..1a63d3c
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,93 @@
1MAINTAINERCLEANFILES = \
2 ABOUT-NLS \
3 Makefile.in \
4 aclocal.m4 \
5 compile \
6 config.guess \
7 config.h.in \
8 config.rpath \
9 config.sub \
10 configure \
11 depcomp \
12 install-sh \
13 ltmain.sh \
14 missing \
15 m4/libtool.m4 \
16 m4/ltoptions.m4 \
17 m4/ltsugar.m4 \
18 m4/ltversion.m4 \
19 m4/lt~obsolete.m4 \
20 po/boldquot.sed \
21 po/en@boldquot.header \
22 po/en@quot.header \
23 po/insert-header.sin \
24 po/Makefile.in.in \
25 po/Makevars.template \
26 po/quot.sed \
27 po/remove-potcdate.sin \
28 po/Rules-quot \
29 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
30 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2
31
32SUBDIRS = data doc packaging po src
33
34ACLOCAL_AMFLAGS = -I m4
35
36filesdir = $(docdir)
37files_DATA = \
38 AUTHORS \
39 COPYING \
40 ChangeLog \
41 GPLv2.txt \
42 INSTALL \
43 NEWS \
44 README \
45 TODO
46
47EXTRA_DIST = \
48 GPLv2.txt \
49 autogen.sh \
50 config.rpath \
51 configure \
52 m4/efl_attribute.m4 \
53 m4/efl_binary.m4 \
54 m4/efl_compiler_flag.m4 \
55 m4/efl_path_max.m4
56
57if EFL_HAVE_LCOV
58
59lcov-reset:
60 @rm -rf $(top_builddir)/coverage
61 @find $(top_builddir) -name "*.gcda" -delete
62 @lcov --zerocounters --directory $(top_builddir)
63
64lcov-report:
65 @mkdir $(top_builddir)/coverage
66 lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)/src/lib --base-directory $(top_srcdir)/src/lib
67 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
68 lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info
69 genhtml --branch-coverage -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned2.info
70 @echo "Coverage Report at $(top_builddir)/coverage/html"
71
72endif
73
74if EFL_HAVE_TESTS
75
76TESTS = src/tests/skeleton_tests
77
78lcov-check:
79if EFL_HAVE_LCOV
80 @$(MAKE) $(AM_MAKEFLAGS) lcov-reset
81endif
82 @$(MAKE) $(AM_MAKEFLAGS) check
83if EFL_HAVE_LCOV
84 @$(MAKE) $(AM_MAKEFLAGS) lcov-report
85endif
86
87endif
88
89# cleaning
90
91clean-local:
92 rm -rf benchmark coverage
93
diff --git a/Makefile_Edje_Helper.am b/Makefile_Edje_Helper.am
new file mode 100644
index 0000000..3f05237
--- /dev/null
+++ b/Makefile_Edje_Helper.am
@@ -0,0 +1,9 @@
1EDJE_CC = @edje_cc@
2EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
3EDJE_CC_FLAGS_VERBOSE_ = $(EDJE_CC_FLAGS_VERBOSE_@AM_DEFAULT_V@)
4EDJE_CC_FLAGS_VERBOSE_1 = -v
5EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_VERBOSE) -fastdecomp -id $(srcdir) -fd $(srcdir)
6
7AM_V_EDJ = $(am__v_EDJ_@AM_V@)
8am__v_EDJ_ = $(am__v_EDJ_@AM_DEFAULT_V@)
9am__v_EDJ_0 = @echo " EDJ " $@;
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TODO
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..fe644eb
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6echo "Running autopoint..." ; autopoint -f || :
7echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1
8echo "Running autoconf..." ; autoconf || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
11echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
12
13if [ -z "$NOCONFIGURE" ]; then
14 ./configure "$@"
15fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..66e6a88
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,97 @@
1### Skeleton autotools to write an EFL based application
2### Don't forget to put your email as a maintainer ;-)
3EFL_VERSION([1], [8], [99], [dev])
4AC_INIT([skeleton], [efl_version], [enlightenment-devel@lists.sourceforge.net])
5
6AC_PREREQ([2.65])
7AC_CONFIG_SRCDIR([configure.ac])
8AC_CONFIG_HEADERS([config.h])
9
10AC_CANONICAL_BUILD
11AC_CANONICAL_HOST
12
13AM_INIT_AUTOMAKE([1.10 dist-bzip2 -Wall color-tests])
14m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15AM_PROG_AR
16
17# this will speed up libtool checks
18LT_PREREQ([2.2])
19LT_INIT([win32-dll pic-only])
20EFL_INIT
21
22AC_PROG_CC
23AM_PROG_CC_C_O
24EFL_ATTRIBUTE_UNUSED
25ELM_QUICKLAUNCH
26EFL_COMPILER_FLAG([-Wall])
27EFL_COMPILER_FLAG([-W])
28
29# Checks for header files.
30EFL_CHECK_PATH_MAX
31
32# Check for EFL
33PKG_CHECK_MODULES([SKELETON],
34[
35 eina >= 1.8.0
36 evas >= 1.8.0
37 ecore >= 1.8.0
38 edje >= 1.8.0
39 elementary >= 1.8.0
40])
41
42# Check for tests and coverage
43AC_ARG_WITH([tests],
44 [AC_HELP_STRING([--with-tests=none|regular|coverage],
45 [choose testing method: regular, coverage or none.
46 @<:@default=none@:>@])],
47 [build_tests=${withval}],
48 [build_tests=auto])
49
50EFL_TESTS([${build_tests}])
51
52# doxygen program for documentation building
53EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
54
55# Check edje_cc
56EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
57
58# Checks for library functions.
59AC_CHECK_FUNCS([setlocale])
60
61AM_GNU_GETTEXT_VERSION([0.17])
62AM_GNU_GETTEXT([external])
63
64AC_CONFIG_FILES([
65Makefile
66data/Makefile
67data/themes/Makefile
68data/themes/default/Makefile
69doc/Makefile
70packaging/Makefile
71packaging/slackware/Makefile
72packaging/pkgbuild/Makefile
73po/Makefile.in
74src/Makefile
75src/bin/Makefile
76src/lib/Makefile
77src/tests/Makefile
78])
79AC_OUTPUT
80
81echo
82echo
83echo "------------------------------------------------------------------------"
84echo "$PACKAGE_NAME $PACKAGE_VERSION"
85echo "------------------------------------------------------------------------"
86echo
87echo "Compilation..............: make (or gmake)"
88echo " CFLAGS.................: $CFLAGS"
89echo " edje_cc................: ${edje_cc}"
90echo
91echo "Building documentation...: ${build_doc}"
92echo "Building tests...........: ${have_tests}"
93echo "Generate coverage .......: ${have_lcov}"
94echo
95echo "Installation.............: make install (as root if needed, with 'su' or 'sudo')"
96echo " prefix.................: $prefix"
97echo
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..7d904a4
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,3 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = themes
diff --git a/data/images/logo.png b/data/images/logo.png
new file mode 100644
index 0000000..9037bea
--- /dev/null
+++ b/data/images/logo.png
Binary files differ
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
new file mode 100644
index 0000000..31a2b40
--- /dev/null
+++ b/data/themes/Makefile.am
@@ -0,0 +1,4 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = default
4
diff --git a/data/themes/default/Makefile.am b/data/themes/default/Makefile.am
new file mode 100644
index 0000000..2612ac0
--- /dev/null
+++ b/data/themes/default/Makefile.am
@@ -0,0 +1,22 @@
1AUTOMAKE_OPTIONS = subdir-objects
2MAINTAINERCLEANFILES = Makefile.in
3
4EXTRA_DIST = \
5default.edc \
6images/enlightenment.png \
7sounds/bell.wav
8
9include ../../../Makefile_Edje_Helper.am
10
11filesdir = $(datadir)/$(PACKAGE)/themes
12files_DATA = default.edj
13
14default.edj: Makefile $(EXTRA_DIST)
15 $(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) \
16 -id ${top_srcdir}/data/themes/default/images \
17 -sd ${top_srcdir}/data/themes/default/sounds \
18 $(top_srcdir)/data/themes/default/default.edc \
19 $(top_builddir)/data/themes/default/default.edj
20
21clean-local:
22 rm -f *.edj
diff --git a/data/themes/default/default.edc b/data/themes/default/default.edc
new file mode 100644
index 0000000..b1bacd8
--- /dev/null
+++ b/data/themes/default/default.edc
@@ -0,0 +1,21 @@
1images.image: "enlightenment.png" COMP;
2
3collections {
4 sounds {
5 sample {
6 name: "bell" LOSSY 64;
7 source: "bell.wav";
8 }
9 }
10
11 group {
12 name: "test";
13 parts {
14 part { name: "main"; type: IMAGE;
15 description {
16 image.normal: "enlightenment.png";
17 }
18 }
19 }
20 }
21}
diff --git a/data/themes/default/images/enlightenment.png b/data/themes/default/images/enlightenment.png
new file mode 100644
index 0000000..759381d
--- /dev/null
+++ b/data/themes/default/images/enlightenment.png
Binary files differ
diff --git a/data/themes/default/sounds/bell.wav b/data/themes/default/sounds/bell.wav
new file mode 100644
index 0000000..c052881
--- /dev/null
+++ b/data/themes/default/sounds/bell.wav
Binary files differ
diff --git a/description b/description
new file mode 100644
index 0000000..9d02d59
--- /dev/null
+++ b/description
@@ -0,0 +1 @@
This application is a skeleton application for whoever want to do a Elementary/EFL application/library/server.
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..75ffa0d
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,44 @@
1MAINTAINERCLEANFILES = Makefile.in
2EXTRA_DIST = skeleton.1
3
4man_MANS = skeleton.1
5
6
7.PHONY: doc
8
9PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
10
11if EFL_BUILD_DOC
12
13doc-clean:
14 rm -rf html/ latex/ man/ xml/ $(top_builddir)/$(PACKAGE_DOCNAME).tar*
15
16doc: all
17 $(efl_doxygen)
18 cp $(srcdir)/img/* html/
19 cp $(srcdir)/img/*.eps latex/
20 rm -rf $(PACKAGE_DOCNAME).tar*
21 mkdir -p $(PACKAGE_DOCNAME)/doc
22 cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
23 tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
24 bzip2 -9 $(PACKAGE_DOCNAME).tar
25 rm -rf $(PACKAGE_DOCNAME)/
26 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
27 @echo "Documentation Package: doc/$(PACKAGE_DOCNAME).tar.bz2"
28 @echo "Documentation HTML: doc/html"
29
30clean-local: doc-clean
31
32else
33
34doc:
35 @echo "Documentation not built. Run ./configure --help"
36
37endif
38
39EXTRA_DIST = \
40Doxyfile.in \
41e.css \
42head.html \
43foot.html
44
diff --git a/doc/skeleton.1 b/doc/skeleton.1
new file mode 100644
index 0000000..5f76970
--- /dev/null
+++ b/doc/skeleton.1
@@ -0,0 +1,50 @@
1.TH SKELETON 1 "21 Mar 2013" "skeleton 0.2.3"
2
3.SH NAME
4skeleton \- a minesweeper clone based on the EFL
5
6.SH SYNOPSIS
7.B skeleton
8[-d] [-f] [-t=THEME] [-m=MINES] [-L] [-C] [-V] [-h]
9
10.SH DESCRIPTION
11
12Skeleton is a demo application to show how to integrate EFL and autotools into a
13cross platform build. You should be able to generate an executable easily for all
14target supported by EFL with this skeleton.
15
16With no option, the program starts and display an Hello World.
17
18
19.SH OPTIONS
20
21.TP
22.B -L, --license
23Show license.
24
25.TP
26.B -C, --copyright
27Show copyright.
28
29.TP
30.B -V, --version
31Show program version.
32
33.TP
34.B -h, --help
35Print list of options with short description.
36
37
38.SH BUGS
39
40Reports are welcome.
41
42
43.SH HOMEPAGE
44
45http://enlightenment.org
46
47
48.SH AUTHORS
49
50Cedric Bail <cedric.bail@samsung.com> and various contributors.
diff --git a/m4/efl_attribute.m4 b/m4/efl_attribute.m4
new file mode 100644
index 0000000..78bff15
--- /dev/null
+++ b/m4/efl_attribute.m4
@@ -0,0 +1,56 @@
1dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macros for checking if the compiler supports some __attribute__ uses
5
6dnl Usage: EFL_ATTRIBUTE_UNUSED
7dnl call AC_DEFINE for __UNUSED__ if __attribute__((unused)) is available
8
9AC_DEFUN([EFL_ATTRIBUTE_UNUSED],
10[
11AC_MSG_CHECKING([for __attribute__ ((unused))])
12AC_COMPILE_IFELSE(
13 [AC_LANG_PROGRAM(
14 [[
15void foo(int x __attribute__ ((unused))) {}
16 ]],
17 [[
18 ]])],
19 [have_attribute_unused="yes"],
20 [have_attribute_unused="no"])
21AC_MSG_RESULT([${have_attribute_unused}])
22
23if test "x${have_attribute_unused}" = "xyes" ; then
24 AC_DEFINE([__UNUSED__], [__attribute__ ((unused))], [Macro declaring a function argument to be unused.])
25else
26 AC_DEFINE([__UNUSED__], [], [__attribute__ ((unused)) is not supported.])
27fi
28])
29
30dnl Usage: EFL_ATTRIBUTE_VECTOR
31dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available
32
33AC_DEFUN([EFL_ATTRIBUTE_VECTOR],
34[
35AC_MSG_CHECKING([for __attribute__ ((vector))])
36AC_COMPILE_IFELSE(
37 [AC_LANG_PROGRAM(
38 [[
39typedef int v4si __attribute__ ((vector_size (16)));
40 ]],
41 [[
42if (sizeof(v4si) == 16)
43 return 0;
44else
45 return -1;
46 ]])],
47 [have_attribute_vector="yes"],
48 [have_attribute_vector="no"])
49AC_MSG_RESULT([${have_attribute_vector}])
50
51if test "x${have_attribute_vector}" = "xyes" ; then
52 AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).])
53fi
54])
55
56dnl End of efl_attribute.m4
diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4
new file mode 100644
index 0000000..91a26b2
--- /dev/null
+++ b/m4/efl_binary.m4
@@ -0,0 +1,79 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
45
46
47dnl Macro that check if a binary is built or not
48
49dnl Usage: EFL_WITH_BIN(package, binary, default_value)
50dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
56m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))dnl
57
58dnl configure option
59
60AC_ARG_WITH([$2],
61 [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=$3@:>@])],
62 [
63 _efl_with_binary=${withval}
64 _efl_binary_define="yes"
65 ],
66 [
67 _efl_with_binary=$(pkg-config --variable=prefix $1)/bin/$3
68 _efl_binary_define="no"
69 ])
70
71DOWN=${_efl_with_binary}
72AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
73
74with_binary_[]m4_defn([DOWN])=${_efl_with_binary}
75
76AM_CONDITIONAL(HAVE_[]UP, [test "x${_efl_binary_define}" = "xyes"])
77AC_SUBST(DOWN)
78
79])
diff --git a/m4/efl_compiler_flag.m4 b/m4/efl_compiler_flag.m4
new file mode 100644
index 0000000..25c285d
--- /dev/null
+++ b/m4/efl_compiler_flag.m4
@@ -0,0 +1,57 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com>
3dnl That code is public domain and can be freely used or copied.
4
5dnl Macro that checks if a compiler flag is supported by the compiler.
6
7dnl Usage: EFL_COMPILER_FLAG(flag)
8dnl flag is added to CFLAGS if supported.
9
10AC_DEFUN([EFL_COMPILER_FLAG],
11[
12
13CFLAGS_save="${CFLAGS}"
14CFLAGS="${CFLAGS} $1"
15
16AC_LANG_PUSH([C])
17AC_MSG_CHECKING([whether the compiler supports $1])
18
19AC_COMPILE_IFELSE(
20 [AC_LANG_PROGRAM([[]])],
21 [have_flag="yes"],
22 [have_flag="no"])
23AC_MSG_RESULT([${have_flag}])
24
25if test "x${have_flag}" = "xno" ; then
26 CFLAGS="${CFLAGS_save}"
27fi
28AC_LANG_POP([C])
29
30])
31
32dnl Macro that checks if a linker flag is supported by the compiler.
33
34dnl Usage: EFL_LINKER_FLAG(flag)
35dnl flag is added to LDFLAGS if supported (will be passed to ld anyway).
36
37AC_DEFUN([EFL_LINKER_FLAG],
38[
39
40LDFLAGS_save="${LDFLAGS}"
41LDFLAGS="${LDFLAGS} $1"
42
43AC_LANG_PUSH([C])
44AC_MSG_CHECKING([whether the compiler supports $1])
45
46AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([[]])],
48 [have_flag="yes"],
49 [have_flag="no"])
50AC_MSG_RESULT([${have_flag}])
51
52if test "x${have_flag}" = "xno" ; then
53 LDFLAGS="${LDFLAGS_save}"
54fi
55AC_LANG_POP([C])
56
57])
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4
new file mode 100644
index 0000000..0c1452f
--- /dev/null
+++ b/m4/efl_doxygen.m4
@@ -0,0 +1,98 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_ARG_ENABLE([doc],
18 [AC_HELP_STRING(
19 [--disable-doc],
20 [Disable documentation build @<:@default=enabled@:>@])],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_enable_doc="yes"
24 else
25 efl_enable_doc="no"
26 fi
27 ],
28 [efl_enable_doc="yes"]
29)
30
31if test "x${efl_enable_doc}" = "xyes" ; then
32
33dnl
34dnl Specify the full file name, with path
35dnl
36
37 efl_doxygen="doxygen"
38
39 AC_ARG_WITH([doxygen],
40 [AC_HELP_STRING(
41 [--with-doxygen=FILE],
42 [doxygen program to use @<:@default=doxygen@:>@])],
43dnl
44dnl Check the given doxygen program.
45dnl
46 [efl_doxygen=${withval}
47 AC_CHECK_PROG([efl_have_doxygen],
48 [${efl_doxygen}],
49 [yes],
50 [no])
51 if test "x${efl_have_doxygen}" = "xno" ; then
52 echo "WARNING:"
53 echo "The doxygen program you specified:"
54 echo "$efl_doxygen"
55 echo "was not found. Please check the path and make sure "
56 echo "the program exists and is executable."
57 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
58 fi
59 ],
60 [AC_CHECK_PROG([efl_have_doxygen],
61 [${efl_doxygen}],
62 [yes],
63 [no])
64 if test "x${efl_have_doxygen}" = "xno" ; then
65 echo "WARNING:"
66 echo "The doxygen program was not found in your execute"
67 echo "You may have doxygen installed somewhere not covered by your path."
68 echo ""
69 echo "If this is the case make sure you have the packages installed, AND"
70 echo "that the doxygen program is in your execute path (see your"
71 echo "shell manual page on setting the \$PATH environment variable), OR"
72 echo "alternatively, specify the program to use with --with-doxygen."
73 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
74 fi
75 ]
76 )
77fi
78
79dnl
80dnl Substitution
81dnl
82AC_SUBST([efl_doxygen])
83
84if ! test "x${efl_have_doxygen}" = "xyes" ; then
85 efl_enable_doc="no"
86fi
87
88AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
89
90if test "x${efl_enable_doc}" = "xyes" ; then
91 ifelse([$1], , :, [$1])
92else
93 ifelse([$2], , :, [$2])
94fi
95
96])
97
98dnl End of doxygen.m4
diff --git a/m4/efl_path_max.m4 b/m4/efl_path_max.m4
new file mode 100644
index 0000000..f57bfd2
--- /dev/null
+++ b/m4/efl_path_max.m4
@@ -0,0 +1,36 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int i = PATH_MAX;
24 ]])],
25 [AC_MSG_RESULT([yes])],
26 [
27 AC_DEFINE_UNQUOTED([PATH_MAX],
28 [${default_max}],
29 [default value since PATH_MAX is not defined])
30 AC_MSG_RESULT([no: using ${default_max}])
31 ])
32
33AC_LANG_POP([C])
34
35])
36dnl end of efl_path_max.m4
diff --git a/m4/efl_tests.m4 b/m4/efl_tests.m4
new file mode 100644
index 0000000..2b6106c
--- /dev/null
+++ b/m4/efl_tests.m4
@@ -0,0 +1,65 @@
1dnl Copyright (C) 2013 Cedric BAIL <cedric.bail at free dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro for checking availability of tests and coverage infra structure
5
6dnl Usage: EFL_TESTS(profile)
7dnl Valid profile are auto, tests, coverage, no
8dnl Call PKG_CHECK_MODULES, AC_CHECK_PROG, define CHECK_CFLAGS/CHECK_LIBS and modify CFLAGS/LIBS
9dnl It define EFL_HAVE_TESTS/EFL_HAVE_LCOV for use in Makefile.am
10dnl It set have_test and have_coverage to yes/no depending if found
11
12AC_DEFUN([EFL_TESTS],
13[
14build_tests=$1
15
16case "${build_tests}" in
17 auto)
18 check_tests="auto"
19 check_coverage="auto"
20 ;;
21 tests)
22 check_tests="yes"
23 check_coverage="auto"
24 ;;
25 coverage)
26 check_tests="yes"
27 check_coverage="yes"
28 ;;
29 no)
30 check_tests="no"
31 check_coverage="no"
32 ;;
33 *)
34 AC_MSG_ERROR([Unknow tests profile])
35esac
36
37have_tests="no"
38if test "x${check_tests}" = "xyes" -o "x${check_tests}" = "xauto"; then
39 PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_tests="yes"], [have_tests="no"])
40 if test "${check_tests}" = "xyes" -a "x${have_tests}" = "xno"; then
41 AC_MSG_ERROR([Impossible to find check package to build tests])
42 fi
43fi
44
45if test "x${have_tests}" = "xyes"; then
46 if test "x${check_coverage}" = "xyes" -o "x${check_coverage}" = "xauto"; then
47 AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
48 if test "x${have_lcov}" = "xyes" ; then
49 CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage"
50 LIBS="${LIBS} -lgcov"
51 fi
52 if test "x${have_lcov}" = "xno" -a "x${check_coverage}" = "xyes"; then
53 AC_MSG_ERROR([Impossible to find lcov package to build with coverage support])
54 fi
55 else
56 have_coverage="no"
57 fi
58else
59 have_coverage="no"
60fi
61
62AM_CONDITIONAL([EFL_HAVE_TESTS], [test "x${have_tests}" = "xyes"])
63AM_CONDITIONAL([EFL_HAVE_LCOV], [test "x${have_lcov}" = "xyes"])
64
65])
diff --git a/m4/elm_quicklaunch.m4 b/m4/elm_quicklaunch.m4
new file mode 100644
index 0000000..3db9945
--- /dev/null
+++ b/m4/elm_quicklaunch.m4
@@ -0,0 +1,24 @@
1dnl Copyright (C) 2013 Cedric Bail <cedric dot bail at samsung dot com>
2dnl That code is public domain and can be freely used or copied
3
4dnl Macro that check if -pie -rdynamic can be given to ld
5
6dnl Usage: ELM_QUICKLAUNCH
7dnl add -pie -rdynamic to LDFLAGS and -fpie to CFLAGS
8
9AC_DEFUN([ELM_QUICKLAUNCH],
10[
11AC_MSG_CHECKING([If the compiler as what it takes to do quicklaunch (-pie -rdynamic)])
12old_LDFLAGS="$LDFLAGS"
13old_CFLAGS="$CFLAGS"
14
15LDFLAGS="$LDFLAGS -pie -rdynamic"
16CFLAGS="$CFLAGS -fpie"
17
18AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
19 [AC_MSG_RESULT([yes])],
20 [LDFLAGS="$old_LDFLAGS"
21 CFLAGS="$old_CFLAGS"
22 AC_MSG_RESULT([no])
23 ])
24])
diff --git a/packaging/Makefile.am b/packaging/Makefile.am
new file mode 100644
index 0000000..47eb174
--- /dev/null
+++ b/packaging/Makefile.am
@@ -0,0 +1,4 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = slackware pkgbuild
4
diff --git a/packaging/pkgbuild/Makefile.am b/packaging/pkgbuild/Makefile.am
new file mode 100644
index 0000000..c1675ad
--- /dev/null
+++ b/packaging/pkgbuild/Makefile.am
@@ -0,0 +1,3 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = PKGBUILD
diff --git a/packaging/pkgbuild/PKGBUILD b/packaging/pkgbuild/PKGBUILD
new file mode 100644
index 0000000..f61d994
--- /dev/null
+++ b/packaging/pkgbuild/PKGBUILD
@@ -0,0 +1,60 @@
1# Maintainer: Enlightenment Developers <enlightenment-devel@enlightenment.org>
2pkgname=('skeleton-git' 'skeleton_doc-git')
3pkgver=1.8.99.8967.a1cfce6
4pkgrel=1
5pkgdesc="Enlightenment toolkit skeleton - GIT development snapshot"
6arch=('i686' 'x86_64' 'arm')
7url="http://www.enlightenment.org"
8license=('WTFPL')
9makedepends=('doxygen' 'imagemagick' 'git')
10depends=('elementary-git')
11optdepends=('emotion_generic_players' 'evas_generic_loaders')
12options=('!libtool' 'debug')
13provides=('skeleton')
14
15pkgver() {
16 cd "../.."
17
18 for _i in v_maj v_min v_mic; do
19 local v_ver=$v_ver.$(grep -m 1 $_i configure.ac | sed 's/m4//' | grep -o "[[:digit:]]*")
20 done
21
22 v_ver=$(awk -F , -v v_ver=${v_ver#.} '/^AC_INIT/ {gsub(/v_ver/, v_ver); gsub(/[\[\] -]/, ""); print $2}' configure.ac)
23
24 printf "$v_ver.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
25}
26
27build() {
28 cd "../.."
29 export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer"
30 [[ -e Makefile ]] && make clean distclean
31 ./configure --prefix=/usr \
32 --disable-static
33 make
34 make doc
35}
36
37package_skeleton-git() {
38 cd "../.."
39 make -j1 DESTDIR="$pkgdir/" install
40 install -Dm644 README "$pkgdir/usr/share/$pkgname/README"
41 install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS"
42 install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog"
43 install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS"
44 install -Dm644 COMPLIANCE "$pkgdir/usr/share/$pkgname/COMPLIANCE"
45 install -Dm644 COPYING.images "$pkgdir/usr/share/licenses/$pkgname/COPYING.images"
46 sed -n '1,/details./p' COPYING > "$pkgdir/usr/share/licenses/$pkgname/COPYING"
47 ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING"
48 ln -s "../licenses/$pkgname/COPYING.images" "$pkgdir/usr/share/$pkgname/COPYING.images"
49}
50
51package_skeleton_doc-git() {
52 pkgdesc="Documentation for Skeleton"
53 arch=('any')
54 unset depends optdepends
55
56 cd "../.."
57 mkdir -p "$pkgdir/usr/share/doc/$pkgname"
58 cp -a doc/html "$pkgdir/usr/share/doc/$pkgname/html"
59 cp -a doc/latex "$pkgdir/usr/share/doc/$pkgname/latex"
60}
diff --git a/packaging/slackware/Makefile.am b/packaging/slackware/Makefile.am
new file mode 100644
index 0000000..3cc3675
--- /dev/null
+++ b/packaging/slackware/Makefile.am
@@ -0,0 +1,4 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = doinst.sh skeleton.SlackBuild slack-desc slack-required
4
diff --git a/packaging/slackware/doinst.sh b/packaging/slackware/doinst.sh
new file mode 100644
index 0000000..6dfbe18
--- /dev/null
+++ b/packaging/slackware/doinst.sh
@@ -0,0 +1 @@
# Stuff done after package installation
diff --git a/packaging/slackware/skeleton.SlackBuild b/packaging/slackware/skeleton.SlackBuild
new file mode 100755
index 0000000..1e64083
--- /dev/null
+++ b/packaging/slackware/skeleton.SlackBuild
@@ -0,0 +1,106 @@
1#!/bin/bash
2#
3# Begin skeleton.SlackBuild
4#
5# Copyright (C) 2012-2013 Jerome Pinot <ngc891@gmail.com>
6# All rights reserved.
7#
8# Redistribution and use of this script, with or without modification, is
9# permitted provided that the following conditions are met:
10#
11# 1. Redistributions of this script must retain the above copyright
12# notice, this list of conditions and the following disclaimer.
13#
14# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
15# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25NAME=skeleton
26BUILD=${BUILD:-1jp}
27CWD=$(pwd)
28TMP=${TMP:-/tmp}
29PKG=${TMP}/package-${NAME}
30
31# First check if we are in the right folder
32if [ -f ./${NAME}.SlackBuild ]; then
33 echo 'Found SlackBuild'
34else
35 echo 'Error: You must run this script from the packaging/slackware sub-folder!'
36 exit 1
37fi
38
39# Get the version number from configure.ac
40if [ -f ../../configure.ac ];then
41 VERSION=`grep "AC_INIT" ../../configure.ac | cut -d' ' -f2 | sed -e 's/\[//' -e 's/\],//'`
42else
43 echo "Error: can't find configure.ac!"
44 exit 2
45fi
46
47# if ${ARCH} is unset, we have to guess it with uname
48if [ -z "${ARCH}" ]; then
49 case "$(uname -m)" in
50 i?86) export ARCH=i486 ;;
51 arm*) export ARCH=arm ;;
52 *) export ARCH=$(uname -m) ;;
53 esac
54fi
55
56# Set generic flags for gcc
57SCFLAGS='-O2'
58if [ "${ARCH}" = "i486" ]; then
59 SCFLAGS="${SCFLAGS} -march=i486 -mtune=i686"
60 LIBDIR="/usr/lib"
61elif [ "${ARCH}" = "x86_64" ]; then
62 SCFLAGS="${SCFLAGS} -fPIC"
63 LIBDIR="/usr/lib64"
64elif [ "${ARCH}" = "arm" ]; then
65 SCFLAGS="${SCFLAGS} -march=armv4 -mtune=xscale"
66 LIBDIR="/usr/lib"
67fi
68
69# Creating directories
70if [ ! -d ${TMP} ]; then
71 mkdir -p ${TMP}
72fi
73rm -rf ${PKG}
74mkdir -p ${PKG}
75
76# Configuring
77cd ../..
78CFLAGS="${SCFLAGS}" \
79 ./configure \
80 --prefix=/usr \
81 --libdir=${LIBDIR} \
82 --mandir=/usr/man \
83 --docdir=/usr/doc/${NAME}-${VERSION}
84
85# Building
86make
87
88# Installing
89make DESTDIR=${PKG} install
90
91# Cleaning
92cd ${PKG}
93gzip -9 usr/man/man1/${NAME}.1
94
95find ${PKG} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
96find ${PKG} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
97
98# Building the package
99mkdir install
100install -m644 ${CWD}/doinst.sh install/
101install -m644 ${CWD}/slack-desc install/
102install -m644 ${CWD}/slack-required install/
103makepkg -l y -c n ${CWD}/${NAME}-${VERSION}-${ARCH}-${BUILD}.txz
104rm -rf ${PKG}
105
106# End skeleton.SlackBuild
diff --git a/packaging/slackware/slack-desc b/packaging/slackware/slack-desc
new file mode 100644
index 0000000..893a343
--- /dev/null
+++ b/packaging/slackware/slack-desc
@@ -0,0 +1,19 @@
1# HOW TO EDIT THIS FILE:
2# The "handy ruler" below makes it easier to edit a package description. Line
3# up the first '|' above the ':' following the base package name, and the '|'
4# on the right side marks the last column you can put a character in. You must
5# make exactly 11 lines for the formatting to be correct. It's also
6# customary to leave one space after the ':'.
7
8 |-----handy-ruler------------------------------------------------------|
9skeleton: skeleton
10skeleton:
11skeleton: Skeleton is an example of application written using the Enlightenment
12skeleton: Foundation Libraries.
13skeleton:
14skeleton: It requires elementary.
15skeleton:
16skeleton: skeleton was written by Cedric Bail <cedric.bail@samsung.com>
17skeleton: website: <http://enlightenment.org/>
18skeleton:
19skeleton:
diff --git a/packaging/slackware/slack-required b/packaging/slackware/slack-required
new file mode 100644
index 0000000..29e9f10
--- /dev/null
+++ b/packaging/slackware/slack-required
@@ -0,0 +1,5 @@
1eina >= 1.8.0
2evas >= 1.8.0
3ecore >= 1.8.0
4edje >= 1.8.0
5elementary >= 1.8.0
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..4dd2a0b
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=utf-8
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER =
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS =
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..099f1a0
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,2 @@
1src/bin/skeleton_main.c
2src/bin/skeleton_private.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..15871c9
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,4 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = lib bin tests
4
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
new file mode 100644
index 0000000..a4f97af
--- /dev/null
+++ b/src/bin/Makefile.am
@@ -0,0 +1,19 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3bin_PROGRAMS = skeleton
4
5AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
6-I$(top_builddir)/src/bin/ \
7-I$(top_srcdir)/src/bin/ \
8-I$(top_builddir)/src/lib/ \
9-I$(top_srcdir)/src/lib/ \
10@SKELETON_CFLAGS@
11
12skeleton_SOURCES = skeleton_main.c
13skeleton_LDADD = @SKELETON_LIBS@ $(top_builddir)/src/lib/libskeleton.la
14
15localedir = $(datadir)/locale
16DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
17
18EXTRA_DIST = skeleton_private.h
19
diff --git a/src/bin/gettext.h b/src/bin/gettext.h
new file mode 100644
index 0000000..e76b592
--- /dev/null
+++ b/src/bin/gettext.h
@@ -0,0 +1,280 @@
1/* Convenience header for conditional use of GNU <libintl.h>.
2 Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published
6 by the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 USA. */
18
19#ifndef _LIBGETTEXT_H
20#define _LIBGETTEXT_H 1
21
22/* NLS can be disabled through the configure --disable-nls option. */
23#if ENABLE_NLS
24
25/* Get declarations of GNU message catalog functions. */
26# include <libintl.h>
27
28/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
29 the gettext() and ngettext() macros. This is an alternative to calling
30 textdomain(), and is useful for libraries. */
31# ifdef DEFAULT_TEXT_DOMAIN
32# undef gettext
33# define gettext(Msgid) \
34 dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
35# undef ngettext
36# define ngettext(Msgid1, Msgid2, N) \
37 dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
38# endif
39
40#else
41
42/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
43 chokes if dcgettext is defined as a macro. So include it now, to make
44 later inclusions of <locale.h> a NOP. We don't include <libintl.h>
45 as well because people using "gettext.h" will not include <libintl.h>,
46 and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
47 is OK. */
48#if defined(__sun)
49# include <locale.h>
50#endif
51
52/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
53 <libintl.h>, which chokes if dcgettext is defined as a macro. So include
54 it now, to make later inclusions of <libintl.h> a NOP. */
55#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
56# include <cstdlib>
57# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
58# include <libintl.h>
59# endif
60#endif
61
62/* Disabled NLS.
63 The casts to 'const char *' serve the purpose of producing warnings
64 for invalid uses of the value returned from these functions.
65 On pre-ANSI systems without 'const', the config.h file is supposed to
66 contain "#define const". */
67# undef gettext
68# define gettext(Msgid) ((const char *) (Msgid))
69# undef dgettext
70# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
71# undef dcgettext
72# define dcgettext(Domainname, Msgid, Category) \
73 ((void) (Category), dgettext (Domainname, Msgid))
74# undef ngettext
75# define ngettext(Msgid1, Msgid2, N) \
76 ((N) == 1 \
77 ? ((void) (Msgid2), (const char *) (Msgid1)) \
78 : ((void) (Msgid1), (const char *) (Msgid2)))
79# undef dngettext
80# define dngettext(Domainname, Msgid1, Msgid2, N) \
81 ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
82# undef dcngettext
83# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
84 ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
85# undef textdomain
86# define textdomain(Domainname) ((const char *) (Domainname))
87# undef bindtextdomain
88# define bindtextdomain(Domainname, Dirname) \
89 ((void) (Domainname), (const char *) (Dirname))
90# undef bind_textdomain_codeset
91# define bind_textdomain_codeset(Domainname, Codeset) \
92 ((void) (Domainname), (const char *) (Codeset))
93
94#endif
95
96/* A pseudo function call that serves as a marker for the automated
97 extraction of messages, but does not call gettext(). The run-time
98 translation is done at a different place in the code.
99 The argument, String, should be a literal string. Concatenated strings
100 and other string expressions won't work.
101 The macro's expansion is not parenthesized, so that it is suitable as
102 initializer for static 'char[]' or 'const char[]' variables. */
103#define gettext_noop(String) String
104
105/* The separator between msgctxt and msgid in a .mo file. */
106#define GETTEXT_CONTEXT_GLUE "\004"
107
108/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
109 MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
110 short and rarely need to change.
111 The letter 'p' stands for 'particular' or 'special'. */
112#ifdef DEFAULT_TEXT_DOMAIN
113# define pgettext(Msgctxt, Msgid) \
114 pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
115#else
116# define pgettext(Msgctxt, Msgid) \
117 pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
118#endif
119#define dpgettext(Domainname, Msgctxt, Msgid) \
120 pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
121#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
122 pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
123#ifdef DEFAULT_TEXT_DOMAIN
124# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
125 npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
126#else
127# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
128 npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
129#endif
130#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
131 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
132#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
133 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
134
135#ifdef __GNUC__
136__inline
137#else
138#ifdef __cplusplus
139inline
140#endif
141#endif
142static const char *
143pgettext_aux (const char *domain,
144 const char *msg_ctxt_id, const char *msgid,
145 int category)
146{
147 const char *translation = dcgettext (domain, msg_ctxt_id, category);
148 if (translation == msg_ctxt_id)
149 return msgid;
150 else
151 return translation;
152}
153
154#ifdef __GNUC__
155__inline
156#else
157#ifdef __cplusplus
158inline
159#endif
160#endif
161static const char *
162npgettext_aux (const char *domain,
163 const char *msg_ctxt_id, const char *msgid,
164 const char *msgid_plural, unsigned long int n,
165 int category)
166{
167 const char *translation =
168 dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
169 if (translation == msg_ctxt_id || translation == msgid_plural)
170 return (n == 1 ? msgid : msgid_plural);
171 else
172 return translation;
173}
174
175/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
176 can be arbitrary expressions. But for string literals these macros are
177 less efficient than those above. */
178
179#include <string.h>
180
181#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
182 (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
183 /* || __STDC_VERSION__ >= 199901L */ )
184
185#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
186#include <stdlib.h>
187#endif
188
189#define pgettext_expr(Msgctxt, Msgid) \
190 dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
191#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
192 dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
193
194#ifdef __GNUC__
195__inline
196#else
197#ifdef __cplusplus
198inline
199#endif
200#endif
201static const char *
202dcpgettext_expr (const char *domain,
203 const char *msgctxt, const char *msgid,
204 int category)
205{
206 size_t msgctxt_len = strlen (msgctxt) + 1;
207 size_t msgid_len = strlen (msgid) + 1;
208 const char *translation;
209#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
210 char msg_ctxt_id[msgctxt_len + msgid_len];
211#else
212 char buf[1024];
213 char *msg_ctxt_id =
214 (msgctxt_len + msgid_len <= sizeof (buf)
215 ? buf
216 : (char *) malloc (msgctxt_len + msgid_len));
217 if (msg_ctxt_id != NULL)
218#endif
219 {
220 memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
221 msg_ctxt_id[msgctxt_len - 1] = '\004';
222 memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
223 translation = dcgettext (domain, msg_ctxt_id, category);
224#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
225 if (msg_ctxt_id != buf)
226 free (msg_ctxt_id);
227#endif
228 if (translation != msg_ctxt_id)
229 return translation;
230 }
231 return msgid;
232}
233
234#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
235 dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
236#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
237 dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
238
239#ifdef __GNUC__
240__inline
241#else
242#ifdef __cplusplus
243inline
244#endif
245#endif
246static const char *
247dcnpgettext_expr (const char *domain,
248 const char *msgctxt, const char *msgid,
249 const char *msgid_plural, unsigned long int n,
250 int category)
251{
252 size_t msgctxt_len = strlen (msgctxt) + 1;
253 size_t msgid_len = strlen (msgid) + 1;
254 const char *translation;
255#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
256 char msg_ctxt_id[msgctxt_len + msgid_len];
257#else
258 char buf[1024];
259 char *msg_ctxt_id =
260 (msgctxt_len + msgid_len <= sizeof (buf)
261 ? buf
262 : (char *) malloc (msgctxt_len + msgid_len));
263 if (msg_ctxt_id != NULL)
264#endif
265 {
266 memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
267 msg_ctxt_id[msgctxt_len - 1] = '\004';
268 memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
269 translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
270#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
271 if (msg_ctxt_id != buf)
272 free (msg_ctxt_id);
273#endif
274 if (!(translation == msg_ctxt_id || translation == msgid_plural))
275 return translation;
276 }
277 return (n == 1 ? msgid : msgid_plural);
278}
279
280#endif /* _LIBGETTEXT_H */
diff --git a/src/bin/skeleton_main.c b/src/bin/skeleton_main.c
new file mode 100644
index 0000000..84ebe45
--- /dev/null
+++ b/src/bin/skeleton_main.c
@@ -0,0 +1,119 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5/* NOTE: Respecting header order is important for portability.
6 * Always put system first, then EFL, then your public header,
7 * and finally your private one. */
8
9#include <Ecore_Getopt.h>
10#include <Elementary.h>
11
12#include "gettext.h"
13
14#include "Skeleton.h"
15
16#include "skeleton_private.h"
17
18// FIXME: Don't forget to put your name below instead of mine ;-) And remove the comment when done !
19#define COPYRIGHT "Copyright © 2013 Cedric BAIL <cedric.bail@samsung.com> and various contributors (see AUTHORS)."
20
21static void
22_skeleton_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
23{
24 elm_exit();
25}
26
27static Evas_Object *
28skeleton_win_setup(void)
29{
30 Evas_Object *win;
31 Evas_Object *label;
32
33 win = elm_win_util_standard_add("main", "Skeleton");
34 if (!win) return NULL;
35
36 elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
37 evas_object_smart_callback_add(win, "delete,request", _skeleton_win_del, NULL);
38
39 label = elm_label_add(win);
40 elm_object_text_set(label, " Hello World !");
41 evas_object_size_hint_weight_set(label, 0.0, EVAS_HINT_EXPAND);
42 evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL);
43 evas_object_show(label);
44
45 elm_win_resize_object_add(win, label);
46
47 evas_object_show(win);
48
49 return win;
50}
51
52static const Ecore_Getopt optdesc = {
53 "skeleton",
54 "%prog [options]",
55 PACKAGE_VERSION,
56 COPYRIGHT,
57 "BSD with advertisement clause",
58 "An EFL skeleton program",
59 0,
60 {
61 ECORE_GETOPT_LICENSE('L', "license"),
62 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
63 ECORE_GETOPT_VERSION('V', "version"),
64 ECORE_GETOPT_HELP('h', "help"),
65 ECORE_GETOPT_SENTINEL
66 }
67};
68
69EAPI_MAIN int
70elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
71{
72 Evas_Object *win;
73 int args;
74 Eina_Bool quit_option = EINA_FALSE;
75
76 Ecore_Getopt_Value values[] = {
77 ECORE_GETOPT_VALUE_BOOL(quit_option),
78 ECORE_GETOPT_VALUE_BOOL(quit_option),
79 ECORE_GETOPT_VALUE_BOOL(quit_option),
80 ECORE_GETOPT_VALUE_BOOL(quit_option),
81 ECORE_GETOPT_VALUE_NONE
82 };
83
84#if ENABLE_NLS
85 setlocale(LC_ALL, "");
86 bindtextdomain(PACKAGE, LOCALEDIR);
87 bind_textdomain_codeset(PACKAGE, "UTF-8");
88 textdomain(PACKAGE);
89#endif
90
91 skeleton_init();
92
93 args = ecore_getopt_parse(&optdesc, values, argc, argv);
94 if (args < 0)
95 {
96 EINA_LOG_CRIT("Could not parse arguments.");
97 goto end;
98 }
99 else if (quit_option)
100 {
101 goto end;
102 }
103
104 elm_app_info_set(elm_main, "skeleton", "images/logo.png");
105
106 if (!(win = skeleton_win_setup()))
107 goto end;
108
109 skeleton_library_call();
110
111 elm_run();
112
113 end:
114 skeleton_shutdown();
115 elm_shutdown();
116
117 return 0;
118}
119ELM_MAIN()
diff --git a/src/bin/skeleton_private.h b/src/bin/skeleton_private.h
new file mode 100644
index 0000000..f12d682
--- /dev/null
+++ b/src/bin/skeleton_private.h
@@ -0,0 +1,6 @@
1#ifndef SKELETON_PRIVATE_H_
2# define SKELETON_PRIVATE_H_
3
4// FIXME: put some private stuff related to your binary
5
6#endif
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
new file mode 100644
index 0000000..fc1f0bb
--- /dev/null
+++ b/src/lib/Makefile.am
@@ -0,0 +1,18 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib \
5-I$(top_builddir)/src/lib \
6-DPACKAGE_LIB_DIR=\"$(libdir)\" \
7-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
8@SKELETON_CFLAGS@ \
9-DEFL_SKELETON_BUILD
10
11lib_LTLIBRARIES = libskeleton.la
12
13includes_HEADERS = Skeleton.h
14includesdir = $(includedir)/skeleton-@VMAJ@
15
16libskeleton_la_SOURCES = skeleton.c
17libskeleton_la_LIBADD = @SKELETON_LIBS@ -lm
18libskeleton_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
diff --git a/src/lib/Skeleton.h b/src/lib/Skeleton.h
new file mode 100644
index 0000000..83470cf
--- /dev/null
+++ b/src/lib/Skeleton.h
@@ -0,0 +1,111 @@
1#ifndef SKELETON_H_
2# define SKELETON_H_
3
4#include <Elementary.h>
5
6#ifdef EAPI
7# undef EAPI
8#endif
9
10#ifdef _WIN32
11# ifdef EFL_SKELETON_BUILD
12# ifdef DLL_EXPORT
13# define EAPI __declspec(dllexport)
14# else
15# define EAPI
16# endif /* ! DLL_EXPORT */
17# else
18# define EAPI __declspec(dllimport)
19# endif /* ! EFL_SKELETON_BUILD */
20#else
21# ifdef __GNUC__
22# if __GNUC__ >= 4
23# define EAPI __attribute__ ((visibility("default")))
24# else
25# define EAPI
26# endif
27# else
28# define EAPI
29# endif
30#endif /* ! _WIN32 */
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/**
37 * @file
38 * @brief These routines are used for Skeleton library interaction.
39 */
40
41/**
42 * @brief Init / shutdown functions.
43 * @defgroup Init Init / Shutdown
44 *
45 * @{
46 *
47 * Functions of obligatory usage, handling proper initialization
48 * and shutdown routines.
49 *
50 * Before the usage of any other function, Skeleton should be properly
51 * initialized with @ref skeleton_init() and the last call to Skeleton's
52 * functions should be @ref skeleton_shutdown(), so everything will
53 * be correctly freed.
54 *
55 * Skeleton logs everything with Eina Log, using the "skeleton" log domain.
56 *
57 */
58
59/**
60 * Initialize Skeleton.
61 *
62 * Initializes Skeleton, its dependencies and modules. Should be the first
63 * function of Skeleton to be called.
64 *
65 * @return The init counter value.
66 *
67 * @see skeleton_shutdown().
68 *
69 * @ingroup Init
70 */
71EAPI int skeleton_init(void);
72
73/**
74 * Shutdown Skeleton
75 *
76 * Shutdown Skeleton. If init count reaches 0, all the internal structures will
77 * be freed. Any Skeleton library call after this point will leads to an error.
78 *
79 * @return Skeleton's init counter value.
80 *
81 * @see skeleton_init().
82 *
83 * @ingroup Init
84 */
85EAPI int skeleton_shutdown(void);
86
87/**
88 * @}
89 */
90
91/**
92 * @brief Main group API that wont do anything
93 * @defgroup Main Main
94 *
95 * @{
96 *
97 * @brief A function that doesn't do any good nor any bad
98 *
99 * @ingroup Main
100 */
101EAPI void skeleton_library_call(void);
102
103/**
104 * @}
105 */
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* SKELETON_H_ */
diff --git a/src/lib/skeleton.c b/src/lib/skeleton.c
new file mode 100644
index 0000000..d16fa72
--- /dev/null
+++ b/src/lib/skeleton.c
@@ -0,0 +1,64 @@
1#ifdef HAVE_CONFIG
2# include "config.h"
3#endif
4
5#include "Skeleton.h"
6
7#include "skeleton_private.h"
8
9static int _skeleton_init = 0;
10int _skeleton_lib_log_dom = -1;
11
12EAPI int
13skeleton_init(void)
14{
15 _skeleton_init++;
16 if (_skeleton_init > 1) return _skeleton_init;
17
18 eina_init();
19
20 _skeleton_lib_log_dom = eina_log_domain_register("skeleton", EINA_COLOR_CYAN);
21 if (_skeleton_lib_log_dom < 0)
22 {
23 EINA_LOG_ERR("Skeleton can not create its log domain.");
24 goto shutdown_eina;
25 }
26
27 // Put here your initialization logic of your library
28
29 eina_log_timing(_skeleton_lib_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT);
30
31 return _skeleton_init;
32
33 shutdown_eina:
34 eina_shutdown();
35 _skeleton_init--;
36
37 return _skeleton_init;
38}
39
40EAPI int
41skeleton_shutdown(void)
42{
43 _skeleton_init--;
44 if (_skeleton_init != 0) return _skeleton_init;
45
46 eina_log_timing(_skeleton_lib_log_dom,
47 EINA_LOG_STATE_START,
48 EINA_LOG_STATE_SHUTDOWN);
49
50 // Put here your shutdown logic
51
52 eina_log_domain_unregister(_skeleton_lib_log_dom);
53 _skeleton_lib_log_dom = -1;
54
55 eina_shutdown();
56
57 return _skeleton_init;
58}
59
60EAPI void
61skeleton_library_call(void)
62{
63 INF("Not really doing anything useful.");
64}
diff --git a/src/lib/skeleton_private.h b/src/lib/skeleton_private.h
new file mode 100644
index 0000000..a1045da
--- /dev/null
+++ b/src/lib/skeleton_private.h
@@ -0,0 +1,27 @@
1#ifndef SKELETON_PRIVATE_H
2# define SKELETON_PRIVATE_H
3
4extern int _skeleton_lib_log_dom;
5
6#ifdef ERR
7# undef ERR
8#endif
9#define ERR(...) EINA_LOG_DOM_ERR(_skeleton_lib_log_dom, __VA_ARGS__)
10#ifdef INF
11# undef INF
12#endif
13#define INF(...) EINA_LOG_DOM_INFO(_skeleton_lib_log_dom, __VA_ARGS__)
14#ifdef WRN
15# undef WRN
16#endif
17#define WRN(...) EINA_LOG_DOM_WARN(_skeleton_lib_log_dom, __VA_ARGS__)
18#ifdef CRIT
19# undef CRIT
20#endif
21#define CRIT(...) EINA_LOG_DOM_CRIT(_skeleton_lib_log_dom, __VA_ARGS__)
22#ifdef DBG
23# undef DBG
24#endif
25#define DBG(...) EINA_LOG_DOM_DBG(_skeleton_lib_log_dom, __VA_ARGS__)
26
27#endif
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
new file mode 100644
index 0000000..2cb4e1d
--- /dev/null
+++ b/src/tests/Makefile.am
@@ -0,0 +1,17 @@
1
2if EFL_HAVE_TESTS
3
4check_PROGRAMS = skeleton_tests
5
6skeleton_tests_SOURCES = test_skeleton.c
7skeleton_tests_CPPFLAGS = -I$(top_builddir)/src/lib/ \
8-DPACKAGE_TESTS_DIR=\"$(top_srcdir)/src/tests/\" \
9-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/src/tests/\" \
10@SKELETON_CFLAGS@ \
11@CHECK_CFLAGS@
12skeleton_tests_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libskeleton.la
13skeleton_tests_DEPENDENCIES = $(top_builddir)/src/lib/libskeleton.la
14
15endif
16
17EXTRA_DIST = test_skeleton.c
diff --git a/src/tests/test_skeleton.c b/src/tests/test_skeleton.c
new file mode 100644
index 0000000..a9cfa5f
--- /dev/null
+++ b/src/tests/test_skeleton.c
@@ -0,0 +1,124 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <Ecore_Getopt.h>
6#include <check.h>
7
8#include "Skeleton.h"
9
10#define COPYRIGHT "Copyright © 2013 Cedric BAIL <cedric.bail@samsung.com> and various contributors (see AUTHORS)."
11
12static void skeleton_test_basic(TCase *tc);
13
14static const struct {
15 const char *name;
16 void (*build)(TCase *tc);
17} tests[] = {
18 { "basic", skeleton_test_basic }
19};
20
21START_TEST(skeleton_initialization)
22{
23 fail_if(skeleton_init() != 1);
24
25 skeleton_library_call();
26
27 fail_if(skeleton_shutdown() != 0);
28}
29END_TEST
30
31static void
32skeleton_test_basic(TCase *tc)
33{
34 tcase_add_test(tc, skeleton_initialization);
35}
36
37static const Ecore_Getopt optdesc = {
38 "skeleton",
39 "%prog [options]",
40 PACKAGE_VERSION,
41 COPYRIGHT,
42 "BSD with advertisement clause",
43 "An EFL skeleton program",
44 0,
45 {
46 ECORE_GETOPT_STORE_TRUE('l', "list", "list available tests"),
47 ECORE_GETOPT_STORE_STR('t', "test", "test to run"),
48 ECORE_GETOPT_LICENSE('L', "license"),
49 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
50 ECORE_GETOPT_VERSION('V', "version"),
51 ECORE_GETOPT_HELP('h', "help"),
52 ECORE_GETOPT_SENTINEL
53 }
54};
55
56int
57main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
58{
59 Suite *s;
60 SRunner *sr;
61 TCase *tc = NULL;
62 char *test = NULL;
63 unsigned int i;
64 int failed_count = -1;
65 int args;
66 Eina_Bool quit_option = EINA_FALSE;
67 Eina_Bool list_option = EINA_FALSE;
68
69 Ecore_Getopt_Value values[] = {
70 ECORE_GETOPT_VALUE_BOOL(list_option),
71 ECORE_GETOPT_VALUE_STR(test),
72 ECORE_GETOPT_VALUE_BOOL(quit_option),
73 ECORE_GETOPT_VALUE_BOOL(quit_option),
74 ECORE_GETOPT_VALUE_BOOL(quit_option),
75 ECORE_GETOPT_VALUE_BOOL(quit_option),
76 ECORE_GETOPT_VALUE_NONE
77 };
78
79 eina_init();
80
81 args = ecore_getopt_parse(&optdesc, values, argc, argv);
82 if (args < 0)
83 {
84 EINA_LOG_CRIT("Could not parse arguments.");
85 goto end;
86 }
87 else if (quit_option)
88 {
89 goto end;
90 }
91 else if (list_option)
92 {
93 fprintf(stdout, "Available tests :\n");
94 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
95 fprintf(stdout, "\t%s\n", tests[i].name);
96 goto end;
97 }
98
99 s = suite_create("Skeleton");
100
101 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
102 {
103 if (test && strcmp(tests[i].name, test))
104 continue ;
105
106 tc = tcase_create(tests[i].name);
107 tcase_set_timeout(tc, 0);
108
109 tests[i].build(tc);
110 suite_add_tcase(s, tc);
111 }
112
113 sr = srunner_create(s);
114 srunner_set_xml(sr, PACKAGE_BUILD_DIR "/check-results.xml");
115
116 srunner_run_all(sr, CK_ENV);
117 failed_count = srunner_ntests_failed(sr);
118 srunner_free(sr);
119
120 end:
121 eina_shutdown();
122
123 return (failed_count == 0) ? 0 : 255;
124}