CONTRIBUTING000664001750001750 614612410336616 14506 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022NAME CONTRIBUTING DESCRIPTION If you're reading this document, that means you might be thinking about helping me out with this project. Thanks! Here's some ways you could help out: * Bug reports Found a bug? Great! (Well, not so great I suppose.) The place to report them is . Don't e-mail me about it, as your e-mail is more than likely to get lost amongst the spam. An example script clearly demonstrating the bug (preferably written using Test::More) would be greatly appreciated. * Patches If you've found a bug and written a fix for it, even better! Generally speaking you should check out the latest copy of the code from the source repository rather than using the CPAN distribution. The file META.yml should contain a link to the source repository. If not, then try or submit a bug report. (As far as I'm concerned the lack of a link is a bug.) Many of my distributions are also mirrored at . To submit the patch, do a pull request on GitHub or Bitbucket, or attach a diff file to a bug report. Unless otherwise stated, I'll assume that your contributions are licensed under the same terms as the rest of the project. (If using git, feel free to work in a branch. For Mercurial, I'd prefer bookmarks within the default branch.) * Documentation If there's anything unclear in the documentation, please submit this as a bug report or patch as above. Non-toy example scripts that I can bundle would also be appreciated. * Translation Translations of documentation would be welcome. For translations of error messages and other strings embedded in the code, check with me first. Sometimes the English strings may not in a stable state, so it would be a waste of time translating them. Coding Style I tend to write using something approximating the Allman style, using tabs for indentation and Unix-style line breaks. * * I nominally encode all source files as UTF-8, though in practice most of them use a 7-bit-safe ASCII-compatible subset of UTF-8. AUTHOR Toby Inkster . COPYRIGHT AND LICENCE Copyright (c) 2012-2014 by Toby Inkster. CONTRIBUTING is available under three different licences permitting its redistribution: the CC-BY-SA_UK-2.0 licence, plus the same licences as Perl itself, which is distributed under the GNU General Public Licence version 1, and the Artistic Licence. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License. To view a copy of this license, visit . This file is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. COPYRIGHT000664001750001750 265712410336617 14153 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Dist-Inkt-DOAP Upstream-Contact: Toby Inkster (TOBYINK) Source: https://metacpan.org/release/Dist-Inkt-DOAP Files: Changes META.json META.yml dist.ini doap.ttl lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm lib/Dist/Inkt/Role/ProcessDOAP.pm lib/Dist/Inkt/Role/ProcessDOAPDeps.pm lib/Dist/Inkt/Role/RDFModel.pm lib/Dist/Inkt/Role/ReadMetaDir.pm lib/Dist/Inkt/Role/Test/Changes.pm lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm lib/Dist/Inkt/Role/WriteCREDITS.pm lib/Dist/Inkt/Role/WriteChanges.pm lib/Dist/Inkt/Role/WriteDOAP.pm Copyright: Copyright 2014 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: CONTRIBUTING INSTALL LICENSE Copyright: Unknown License: Unknown Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain Files: README lib/Dist/Inkt/DOAP.pm t/01basic.t Copyright: This software is copyright (c) 2014 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: Makefile.PL Copyright: Copyright 2013 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 License: Artistic-1.0 This software is Copyright (c) 2014 by the copyright holder(s). This is free software, licensed under: The Artistic License 1.0 License: GPL-1.0 This software is Copyright (c) 2014 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000664001750001750 7112410336614 13621 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022Maintainer: - Toby Inkster (TOBYINK) Changes000664001750001750 157412410336614 14145 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022Dist-Inkt-DOAP ============== Created: 2014-05-26 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) 0.022 2014-09-23 - ETHER wants me to use a version range string in x_breaks. 0.021 2014-09-14 - Include test to check if changelog data is up-to-date. 0.020 2014-09-13 - Support x_IRC. 0.019 2014-08-12 [ Bug Fixes ] - Cope better with nulls when generating CREDITS file. [ Documentation ] - Add a DESCRIPTION to Dist::Inkt::DOAP. 0.018 2014-06-03 [ Bug Fixes ] - Don't need to load RDF::DOAP::ChangeSets. [ Test Suite ] - Test that all roles actually compile. [ Packaging ] - Require Dist::Inkt 0.017. 0.017 2014-05-26 [ Bug Fixes ] - Fix syntax error in DetermineRightsFromRdf.pm. 0.016 2014-05-26 Initial release INSTALL000664001750001750 170712410336614 13701 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022 Installing Dist-Inkt-DOAP should be straightforward. INSTALLATION WITH CPANMINUS If you have cpanm, you only need one line: % cpanm Dist::Inkt::DOAP If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Dist::Inkt::DOAP INSTALLATION WITH THE CPAN SHELL Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Dist::Inkt::DOAP MANUAL INSTALLATION As a last resort, you can manually install it. Download the tarball and unpack it. Consult the file META.json for a list of pre-requisites. Install these first. To build Dist-Inkt-DOAP: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install LICENSE000664001750001750 4365512410336614 13705 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2014 by Toby Inkster. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2014 by Toby Inkster. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End MANIFEST000664001750001750 101012410336617 13767 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022CONTRIBUTING COPYRIGHT CREDITS Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE dist.ini doap.ttl lib/Dist/Inkt/DOAP.pm lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm lib/Dist/Inkt/Role/ProcessDOAP.pm lib/Dist/Inkt/Role/ProcessDOAPDeps.pm lib/Dist/Inkt/Role/RDFModel.pm lib/Dist/Inkt/Role/ReadMetaDir.pm lib/Dist/Inkt/Role/Test/Changes.pm lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm lib/Dist/Inkt/Role/WriteCREDITS.pm lib/Dist/Inkt/Role/WriteChanges.pm lib/Dist/Inkt/Role/WriteDOAP.pm t/01basic.t META.json000664001750001750 665012410336616 14275 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022{ "abstract" : "various DOAP-related roles for Dist::Inkt", "author" : [ "Toby Inkster (TOBYINK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.023, CPAN::Meta::Converter version 2.140640", "keywords" : [], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Inkt-DOAP", "no_index" : { "directory" : [ "eg", "examples", "inc", "t", "xt" ] }, "optional_features" : {}, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17" } }, "runtime" : { "requires" : { "Dist::Inkt" : "0.017", "Dist::Inkt::Role::Test" : "0", "MooX::Struct" : "0", "Moose" : "2.0800", "RDF::DOAP::Project" : "0.007", "RDF::Trine" : "1.000", "RDF::TrineX::Functions" : "0", "RDF::TrineX::Parser::Pretdsl" : "0.205", "RDF::TrineX::Serializer::MockTurtleSoup" : "0", "perl" : "5.010001" } }, "test" : { "requires" : { "Test::More" : "0.96" } } }, "provides" : { "Dist::Inkt::DOAP" : { "file" : "lib/Dist/Inkt/DOAP.pm", "version" : "0.022" }, "Dist::Inkt::Role::DetermineRightsFromRdf" : { "file" : "lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm", "version" : "0.022" }, "Dist::Inkt::Role::ProcessDOAP" : { "file" : "lib/Dist/Inkt/Role/ProcessDOAP.pm", "version" : "0.022" }, "Dist::Inkt::Role::ProcessDOAPDeps" : { "file" : "lib/Dist/Inkt/Role/ProcessDOAPDeps.pm", "version" : "0.022" }, "Dist::Inkt::Role::RDFModel" : { "file" : "lib/Dist/Inkt/Role/RDFModel.pm", "version" : "0.022" }, "Dist::Inkt::Role::ReadMetaDir" : { "file" : "lib/Dist/Inkt/Role/ReadMetaDir.pm", "version" : "0.022" }, "Dist::Inkt::Role::Test::Changes" : { "file" : "lib/Dist/Inkt/Role/Test/Changes.pm", "version" : "0.022" }, "Dist::Inkt::Role::WriteCOPYRIGHT" : { "file" : "lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm", "version" : "0.022" }, "Dist::Inkt::Role::WriteCREDITS" : { "file" : "lib/Dist/Inkt/Role/WriteCREDITS.pm", "version" : "0.022" }, "Dist::Inkt::Role::WriteChanges" : { "file" : "lib/Dist/Inkt/Role/WriteChanges.pm", "version" : "0.022" }, "Dist::Inkt::Role::WriteDOAP" : { "file" : "lib/Dist/Inkt/Role/WriteDOAP.pm", "version" : "0.022" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt-DOAP" }, "homepage" : "https://metacpan.org/release/Dist-Inkt-DOAP", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "git://github.com/tobyink/p5-dist-inkt-doap.git", "web" : "https://github.com/tobyink/p5-dist-inkt-doap" }, "x_IRC" : "irc://irc.perl.org/#perlrdf", "x_identifier" : "http://purl.org/NET/cpan-uri/dist/Dist-Inkt-DOAP/project" }, "version" : "0.022" } META.yml000664001750001750 437512410336616 14127 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022--- abstract: 'various DOAP-related roles for Dist::Inkt' author: - 'Toby Inkster (TOBYINK) ' build_requires: Test::More: '0.96' configure_requires: ExtUtils::MakeMaker: '6.17' dynamic_config: 0 generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.023, CPAN::Meta::Converter version 2.140640' keywords: [] license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Inkt-DOAP no_index: directory: - eg - examples - inc - t - xt optional_features: {} provides: Dist::Inkt::DOAP: file: lib/Dist/Inkt/DOAP.pm version: '0.022' Dist::Inkt::Role::DetermineRightsFromRdf: file: lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm version: '0.022' Dist::Inkt::Role::ProcessDOAP: file: lib/Dist/Inkt/Role/ProcessDOAP.pm version: '0.022' Dist::Inkt::Role::ProcessDOAPDeps: file: lib/Dist/Inkt/Role/ProcessDOAPDeps.pm version: '0.022' Dist::Inkt::Role::RDFModel: file: lib/Dist/Inkt/Role/RDFModel.pm version: '0.022' Dist::Inkt::Role::ReadMetaDir: file: lib/Dist/Inkt/Role/ReadMetaDir.pm version: '0.022' Dist::Inkt::Role::Test::Changes: file: lib/Dist/Inkt/Role/Test/Changes.pm version: '0.022' Dist::Inkt::Role::WriteCOPYRIGHT: file: lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm version: '0.022' Dist::Inkt::Role::WriteCREDITS: file: lib/Dist/Inkt/Role/WriteCREDITS.pm version: '0.022' Dist::Inkt::Role::WriteChanges: file: lib/Dist/Inkt/Role/WriteChanges.pm version: '0.022' Dist::Inkt::Role::WriteDOAP: file: lib/Dist/Inkt/Role/WriteDOAP.pm version: '0.022' requires: Dist::Inkt: '0.017' Dist::Inkt::Role::Test: '0' MooX::Struct: '0' Moose: '2.0800' RDF::DOAP::Project: '0.007' RDF::Trine: '1.000' RDF::TrineX::Functions: '0' RDF::TrineX::Parser::Pretdsl: '0.205' RDF::TrineX::Serializer::MockTurtleSoup: '0' perl: '5.010001' resources: IRC: irc://irc.perl.org/#perlrdf Identifier: http://purl.org/NET/cpan-uri/dist/Dist-Inkt-DOAP/project bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt-DOAP homepage: https://metacpan.org/release/Dist-Inkt-DOAP license: http://dev.perl.org/licenses/ repository: git://github.com/tobyink/p5-dist-inkt-doap.git version: '0.022' Makefile.PL000664001750001750 1567512410336616 14655 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022use strict; use ExtUtils::MakeMaker 6.17; my $EUMM = eval( $ExtUtils::MakeMaker::VERSION ); my $meta = { "abstract" => "various DOAP-related roles for Dist::Inkt", "author" => ["Toby Inkster (TOBYINK) "], "dynamic_config" => 0, "generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.023, CPAN::Meta::Converter version 2.140640", "keywords" => [], "license" => ["perl_5"], "meta-spec" => { url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", version => 2, }, "name" => "Dist-Inkt-DOAP", "no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] }, "prereqs" => { configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } }, runtime => { requires => { "Dist::Inkt" => 0.017, "Dist::Inkt::Role::Test" => 0, "Moose" => "2.0800", "MooX::Struct" => 0, "perl" => 5.010001, "RDF::DOAP::Project" => 0.007, "RDF::Trine" => "1.000", "RDF::TrineX::Functions" => 0, "RDF::TrineX::Parser::Pretdsl" => 0.205, "RDF::TrineX::Serializer::MockTurtleSoup" => 0, }, }, test => { requires => { "Test::More" => 0.96 } }, }, "provides" => { "Dist::Inkt::DOAP" => { file => "lib/Dist/Inkt/DOAP.pm", version => 0.022 }, "Dist::Inkt::Role::DetermineRightsFromRdf" => { file => "lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm", version => 0.022, }, "Dist::Inkt::Role::ProcessDOAP" => { file => "lib/Dist/Inkt/Role/ProcessDOAP.pm", version => 0.022 }, "Dist::Inkt::Role::ProcessDOAPDeps" => { file => "lib/Dist/Inkt/Role/ProcessDOAPDeps.pm", version => 0.022 }, "Dist::Inkt::Role::RDFModel" => { file => "lib/Dist/Inkt/Role/RDFModel.pm", version => 0.022 }, "Dist::Inkt::Role::ReadMetaDir" => { file => "lib/Dist/Inkt/Role/ReadMetaDir.pm", version => 0.022 }, "Dist::Inkt::Role::Test::Changes" => { file => "lib/Dist/Inkt/Role/Test/Changes.pm", version => 0.022 }, "Dist::Inkt::Role::WriteChanges" => { file => "lib/Dist/Inkt/Role/WriteChanges.pm", version => 0.022 }, "Dist::Inkt::Role::WriteCOPYRIGHT" => { file => "lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm", version => 0.022 }, "Dist::Inkt::Role::WriteCREDITS" => { file => "lib/Dist/Inkt/Role/WriteCREDITS.pm", version => 0.022 }, "Dist::Inkt::Role::WriteDOAP" => { file => "lib/Dist/Inkt/Role/WriteDOAP.pm", version => 0.022 }, }, "release_status" => "stable", "resources" => { bugtracker => { web => "http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt-DOAP", }, homepage => "https://metacpan.org/release/Dist-Inkt-DOAP", license => ["http://dev.perl.org/licenses/"], repository => { type => "git", url => "git://github.com/tobyink/p5-dist-inkt-doap.git", web => "https://github.com/tobyink/p5-dist-inkt-doap", }, x_identifier => "http://purl.org/NET/cpan-uri/dist/Dist-Inkt-DOAP/project", x_IRC => "irc://irc.perl.org/#perlrdf", }, "version" => 0.022, }; my %dynamic_config; my %WriteMakefileArgs = ( ABSTRACT => $meta->{abstract}, AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]), DISTNAME => $meta->{name}, VERSION => $meta->{version}, EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ], NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n }, test => { TESTS => "t/*.t" }, %dynamic_config, ); $WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001; sub deps { my %r; for my $stage (@_) { for my $dep (keys %{$meta->{prereqs}{$stage}{requires}}) { next if $dep eq 'perl'; my $ver = $meta->{prereqs}{$stage}{requires}{$dep}; $r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep}; } } \%r; } my ($build_requires, $configure_requires, $runtime_requires, $test_requires); if ($EUMM >= 6.6303) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{TEST_REQUIRES} ||= deps('test'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.5503) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build', 'test'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.52) { $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime', 'build', 'test'); } else { $WriteMakefileArgs{PREREQ_PM} ||= deps('configure', 'build', 'test', 'runtime'); } { my ($minperl) = reverse sort( grep defined && /^[0-9]+(\.[0-9]+)?$/, map $meta->{prereqs}{$_}{requires}{perl}, qw( configure build runtime ) ); if (defined($minperl)) { die "Installing $meta->{name} requires Perl >= $minperl" unless $] >= $minperl; $WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl if $EUMM >= 6.48; } } sub FixMakefile { return unless -d 'inc'; my $file = shift; local *MAKEFILE; open MAKEFILE, "< $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; my $makefile = do { local $/; }; close MAKEFILE or die $!; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; open MAKEFILE, "> $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; print MAKEFILE $makefile or die $!; close MAKEFILE or die $!; } my $mm = WriteMakefile(%WriteMakefileArgs); FixMakefile($mm->{FIRST_MAKEFILE} || 'Makefile'); exit(0); README000664001750001750 337412410336614 13532 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022NAME Dist::Inkt::DOAP - various DOAP-related roles for Dist::Inkt DESCRIPTION Dist::Inkt is a framework for writing your own distribution builder. It's a simple class that makes an empty directory, creates a MANIFEST file listing the contents of the directory, and then compresses it into a tarball. Which seems pretty useless. However, it provides tonnes of hooks that can be used by roles applied to the class. This distribution provides a collection of roles that help you populate the distribution's metadata (META.json, Changes, etc) from DOAP. The Straight DOAP So what is DOAP? This explanation is lifted from Wikipedia . *DOAP (Description of a Project) is an RDF Schema and XML vocabulary to describe software projects, in particular free and open source software.* *It was created and initially developed by Edd Dumbill to convey semantic information associated with open source software projects.* *It is currently used in the Mozilla Foundation's project page and in several other software repositories, notably the Python Package Index.* BUGS Please report any bugs to . SEE ALSO Dist::Inkt. AUTHOR Toby Inkster . COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. SIGNATURE000664001750001750 450712410336617 14140 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.73. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 33317486c4fa2cf7fec85bf92ed38ac0f64233a0 CONTRIBUTING SHA1 c5d1e698b8399e1f86533cd5fd978c03fc1b4cab COPYRIGHT SHA1 6bd7b17d81be63d08d4efa6cb80106e72887842c CREDITS SHA1 ae47a78174d1d80c2a640feee4d73056256068eb Changes SHA1 a1002b6c3b308181b7373ebe585f490d7ad36148 INSTALL SHA1 34f5e12514b91055de4b164a1f2327ef5c30ba53 LICENSE SHA1 b16185159db6940d7608332f757071b0648687f7 MANIFEST SHA1 8056a2b28695805c8f3dd71f5a562e0dfa6901ae META.json SHA1 b9ab99eb12ffb50430024815aa04180737d0e79a META.yml SHA1 2b71801682becc7559a7a550cb1ee860fb333b64 Makefile.PL SHA1 00ffa075013d6740e2aa9b4f2eed6fd00f509757 README SHA1 202ca9127a417b5bfde070b3c48126613484081f dist.ini SHA1 b3a152b6712aa016a129cec1269aa7914f9443e4 doap.ttl SHA1 e8ba923bddfcea419220246f66fbce6a376a4cd5 lib/Dist/Inkt/DOAP.pm SHA1 b587568175379efbf0023490f545d13223eb0a75 lib/Dist/Inkt/Role/DetermineRightsFromRdf.pm SHA1 b65e7c2bbdaea666799efe59e9ac08a8989ce267 lib/Dist/Inkt/Role/ProcessDOAP.pm SHA1 e1a6a4bf2a5d5e688fd1bfbcd6220919d53cd5a1 lib/Dist/Inkt/Role/ProcessDOAPDeps.pm SHA1 fab44e8201888820173f30da325098fd56617a52 lib/Dist/Inkt/Role/RDFModel.pm SHA1 63bf9adde2d7cd592970920c38cd0464625edad1 lib/Dist/Inkt/Role/ReadMetaDir.pm SHA1 4a99341ecbd81e9134fcfd6b61c4f5090b21a8cd lib/Dist/Inkt/Role/Test/Changes.pm SHA1 2f6e2b27767be566279682779a7535531ecb3650 lib/Dist/Inkt/Role/WriteCOPYRIGHT.pm SHA1 06a47ba07bbc6e06b66eaca0712b0c11d3065418 lib/Dist/Inkt/Role/WriteCREDITS.pm SHA1 cd6d087310232db03c746f380c83b0d88118929e lib/Dist/Inkt/Role/WriteChanges.pm SHA1 f08a4f7b8b515234ffc29ae5ec842919c2fbd089 lib/Dist/Inkt/Role/WriteDOAP.pm SHA1 6b2c9e34c9b04ef8173d43990dcf6ccafaf34704 t/01basic.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlQhvY8ACgkQzr+BKGoqfTkvfQCgjUnZ4+KyXdii9468P/I5jQ7D U9MAnR3kq0oGsxp+fP/41JhDnB2QvlMe =RXY0 -----END PGP SIGNATURE----- dist.ini000664001750001750 10012410336614 14256 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022;;class='Dist::Inkt::Profile::TOBYINK' ;;name='Dist-Inkt-DOAP' doap.ttl000664001750001750 1564112410336616 14344 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022@prefix cpan-uri: . @prefix dc: . @prefix doap: . @prefix doap-changeset: . @prefix doap-deps: . @prefix foaf: . @prefix rdfs: . @prefix xsd: . dc:title "the same terms as the perl 5 programming language system itself". a doap:Project; cpan-uri:x_IRC ; dc:contributor ; doap-deps:runtime-requirement [ doap-deps:on "perl 5.010001"^^doap-deps:CpanId ], [ doap-deps:on "RDF::TrineX::Serializer::MockTurtleSoup 0"^^doap-deps:CpanId; ], [ doap-deps:on "Moose 2.0800"^^doap-deps:CpanId ], [ doap-deps:on "Dist::Inkt 0.017"^^doap-deps:CpanId ], [ doap-deps:on "Dist::Inkt::Role::Test"^^doap-deps:CpanId; ], [ doap-deps:on "MooX::Struct 0"^^doap-deps:CpanId ], [ doap-deps:on "RDF::DOAP::Project 0.007"^^doap-deps:CpanId; ], [ doap-deps:on "RDF::Trine 1.000"^^doap-deps:CpanId ], [ doap-deps:on "RDF::TrineX::Functions 0"^^doap-deps:CpanId; ], [ doap-deps:on "RDF::TrineX::Parser::Pretdsl 0.205"^^doap-deps:CpanId; ]; doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ]; doap:bug-database ; doap:created "2014-05-26"^^xsd:date; doap:developer ; doap:download-page ; doap:homepage ; doap:license ; doap:maintainer ; doap:name "Dist-Inkt-DOAP"; doap:programming-language "Perl"; doap:release , , , , , , ; doap:repository [ a doap:GitRepository; doap:browse ; ]; doap:shortdesc "various DOAP-related roles for Dist::Inkt". a doap:Version; rdfs:label "Initial release"; dc:identifier "Dist-Inkt-DOAP-0.016"^^xsd:string; dc:issued "2014-05-26"^^xsd:date; doap-changeset:released-by ; doap:file-release ; doap:revision "0.016"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.017"^^xsd:string; dc:issued "2014-05-26"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "Fix syntax error in DetermineRightsFromRdf.pm."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.017"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.018"^^xsd:string; dc:issued "2014-06-03"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Tests; rdfs:label "Test that all roles actually compile."; ], [ a doap-changeset:Packaging; rdfs:label "Require Dist::Inkt 0.017."; ], [ a doap-changeset:Bugfix; rdfs:label "Don't need to load RDF::DOAP::ChangeSets."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.018"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.019"^^xsd:string; dc:issued "2014-08-12"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Documentation; rdfs:label "Add a DESCRIPTION to Dist::Inkt::DOAP."; ], [ a doap-changeset:Bugfix; rdfs:label "Cope better with nulls when generating CREDITS file."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.019"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.020"^^xsd:string; dc:issued "2014-09-13"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Support x_IRC."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.020"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.021"^^xsd:string; dc:issued "2014-09-14"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Include test to check if changelog data is up-to-date."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.021"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-DOAP-0.022"^^xsd:string; dc:issued "2014-09-23"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "ETHER wants me to use a version range string in x_breaks."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.022"^^xsd:string. a foaf:Person; foaf:mbox ; foaf:name "Toby Inkster"; foaf:nick "TOBYINK"; foaf:page . 01basic.t000664001750001750 150012410336614 14511 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/t=pod =encoding utf-8 =head1 PURPOSE Test that Dist::Inkt::DOAP compiles. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut use strict; use warnings; use Test::More; use_ok('Dist::Inkt::DOAP'); use_ok('Dist::Inkt::Role::WriteCREDITS'); use_ok('Dist::Inkt::Role::ReadMetaDir'); use_ok('Dist::Inkt::Role::RDFModel'); use_ok('Dist::Inkt::Role::WriteDOAP'); use_ok('Dist::Inkt::Role::WriteChanges'); use_ok('Dist::Inkt::Role::WriteCOPYRIGHT'); use_ok('Dist::Inkt::Role::ProcessDOAP'); use_ok('Dist::Inkt::Role::DetermineRightsFromRdf'); use_ok('Dist::Inkt::Role::ProcessDOAPDeps'); done_testing; DOAP.pm000664001750001750 364612410336614 16313 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inktuse 5.010001; use strict; use warnings; package Dist::Inkt::DOAP; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; 1; __END__ =pod =encoding utf-8 =for stopwords tarball =head1 NAME Dist::Inkt::DOAP - various DOAP-related roles for Dist::Inkt =head1 DESCRIPTION Dist::Inkt is a framework for writing your own distribution builder. It's a simple class that makes an empty directory, creates a MANIFEST file listing the contents of the directory, and then compresses it into a tarball. Which seems pretty useless. However, it provides tonnes of hooks that can be used by roles applied to the class. This distribution provides a collection of roles that help you populate the distribution's metadata (META.json, Changes, etc) from DOAP. =head2 The Straight DOAP So what is DOAP? This explanation is lifted from L. I<< DOAP (Description of a Project) is an RDF Schema and XML vocabulary to describe software projects, in particular free and open source software. >> I<< It was created and initially developed by Edd Dumbill to convey semantic information associated with open source software projects. >> I<< It is currently used in the Mozilla Foundation's project page and in several other software repositories, notably the Python Package Index. >> =head1 BUGS Please report any bugs to L. =head1 SEE ALSO L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. DetermineRightsFromRdf.pm000664001750001750 1045512410336614 23062 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::DetermineRightsFromRdf; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use RDF::Trine qw( iri literal statement variable ); use List::MoreUtils qw( uniq ); use Path::Tiny qw( path ); use Path::Iterator::Rule; use Software::License; use Software::LicenseUtils; use Types::Standard -types; use namespace::autoclean; my %URIS = ( 'http://www.gnu.org/licenses/agpl-3.0.txt' => 'AGPL_3', 'http://www.apache.org/licenses/LICENSE-1.1' => 'Apache_1_1', 'http://www.apache.org/licenses/LICENSE-2.0' => 'Apache_2_0', 'http://www.apache.org/licenses/LICENSE-2.0.txt' => 'Apache_2_0', 'http://www.perlfoundation.org/artistic_license_1_0' => 'Artistic_1_0', 'http://opensource.org/licenses/artistic-license.php' => 'Artistic_1_0', 'http://www.perlfoundation.org/artistic_license_2_0' => 'Artistic_2_0', 'http://opensource.org/licenses/artistic-license-2.0.php' => 'Artistic_2_0', 'http://www.opensource.org/licenses/bsd-license.php' => 'BSD', 'http://creativecommons.org/publicdomain/zero/1.0/' => 'CC0_1_0', 'http://www.freebsd.org/copyright/freebsd-license.html' => 'FreeBSD', 'http://www.gnu.org/copyleft/fdl.html' => 'GFDL_1_3', 'http://www.opensource.org/licenses/gpl-license.php' => 'GPL_1', 'http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt' => 'GPL_1', 'http://www.opensource.org/licenses/gpl-2.0.php' => 'GPL_2', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt' => 'GPL_2', 'http://www.opensource.org/licenses/gpl-3.0.html' => 'GPL_3', 'http://www.gnu.org/licenses/gpl-3.0.txt' => 'GPL_3', 'http://www.opensource.org/licenses/lgpl-2.1.php' => 'LGPL_2_1', 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt' => 'LGPL_2_1', 'http://www.opensource.org/licenses/lgpl-3.0.html' => 'LGPL_3_0', 'http://www.gnu.org/licenses/lgpl-3.0.txt' => 'LGPL_3_0', 'http://www.opensource.org/licenses/mit-license.php' => 'MIT', 'http://www.mozilla.org/MPL/MPL-1.0.txt' => 'Mozilla_1_0', 'http://www.mozilla.org/MPL/MPL-1.1.txt' => 'Mozilla_1_1', 'http://opensource.org/licenses/mozilla1.1.php' => 'Mozilla_1_1', 'http://www.openssl.org/source/license.html' => 'OpenSSL', 'http://dev.perl.org/licenses/' => 'Perl_5', 'http://www.opensource.org/licenses/postgresql' => 'PostgreSQL', 'http://trolltech.com/products/qt/licenses/licensing/qpl' => 'QPL_1_0', 'http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html' => 'SSLeay', 'http://www.openoffice.org/licenses/sissl_license.html' => 'Sun', 'http://www.zlib.net/zlib_license.html' => 'Zlib', ); eval("require Software::License::$_") for uniq values %URIS; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; my $CPAN = RDF::Trine::Namespace->new('http://purl.org/NET/cpan-uri/terms#'); my $DC = RDF::Trine::Namespace->new('http://purl.org/dc/terms/'); my $DOAP = RDF::Trine::Namespace->new('http://usefulinc.com/ns/doap#'); my $FOAF = RDF::Trine::Namespace->new('http://xmlns.com/foaf/0.1/'); my $NFO = RDF::Trine::Namespace->new('http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#'); my $SKOS = RDF::Trine::Namespace->new('http://www.w3.org/2004/02/skos/core#'); sub _determine_rights_from_rdf { my ($self, $f) = @_; unless ($self->{_rdf_copyright_data}) { my $model = $self->model; my $iter = $model->get_pattern( RDF::Trine::Pattern->new( statement(variable('subject'), $NFO->fileName, variable('filename')), statement(variable('subject'), $DC->license, variable('license')), statement(variable('subject'), $DC->rightsHolder, variable('rights_holder')), statement(variable('rights_holder'), $FOAF->name, variable('name')), ), ); my %results; while (my $row = $iter->next) { my $l = $row->{license}->uri; $row->{class} = literal("Software::License::$URIS{$l}") if exists $URIS{$l}; $results{ $row->{filename}->literal_value } = $row; } $self->{_rdf_copyright_data} = \%results; } if ( my $row = $self->{_rdf_copyright_data}{$f} ) { return ( sprintf("Copyright %d %s.", 1900 + (localtime((stat $f)[9]))[5], $row->{name}->literal_value), $row->{class}->literal_value->new({holder => "the copyright holder(s)"}), ) if $row->{class}; } return; } 1; ProcessDOAP.pm000664001750001750 1433512410336614 20570 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::ProcessDOAP; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use List::MoreUtils 'uniq'; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; my $CPAN = 'RDF::Trine::Namespace'->new('http://purl.org/NET/cpan-uri/terms#'); my $DC = 'RDF::Trine::Namespace'->new('http://purl.org/dc/terms/'); my $DOAP = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#'); my $DEPS = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-deps#'); my $FOAF = 'RDF::Trine::Namespace'->new('http://xmlns.com/foaf/0.1/'); my $NFO = 'RDF::Trine::Namespace'->new('http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#'); my $SKOS = 'RDF::Trine::Namespace'->new('http://www.w3.org/2004/02/skos/core#'); after PopulateMetadata => sub { my $self = shift; $self->log('Processing the DOAP vocabulary'); my $meta = $self->metadata; delete $meta->{abstract} if $meta->{abstract} eq 'unknown'; $meta->{abstract} ||= $_ for grep defined, $self->doap_project->shortdesc; $meta->{description} ||= $_ for grep defined, $self->doap_project->description; push @{ $meta->{license} }, $self->cpanmeta_license_code; my $r = $self->cpanmeta_resources; $meta->{resources}{$_} ||= $r->{$_} for keys %$r; push @{ $meta->{keywords} }, $self->cpanmeta_keywords; for my $role ($self->model->objects(RDF::Trine::iri($self->project_uri), $CPAN->x_help_wanted)) { next unless $role->uri =~ /(\w+)\z/; push @{ $meta->{x_help_wanted} ||= [] }, $1; } }; sub cpanmeta_license_code { my $self = shift; my @r; for (@{ $self->doap_project->license }) { my $license_code = { 'http://www.gnu.org/licenses/agpl-3.0.txt' => 'agpl_3', 'http://www.apache.org/licenses/LICENSE-1.1' => 'apache_1_1', 'http://www.apache.org/licenses/LICENSE-2.0' => 'apache_2_0', 'http://www.apache.org/licenses/LICENSE-2.0.txt' => 'apache_2_0', 'http://www.perlfoundation.org/artistic_license_1_0' => 'artistic_1', 'http://opensource.org/licenses/artistic-license.php' => 'artistic_1', 'http://www.perlfoundation.org/artistic_license_2_0' => 'artistic_2', 'http://opensource.org/licenses/artistic-license-2.0.php' => 'artistic_2', 'http://www.opensource.org/licenses/bsd-license.php' => 'bsd', 'http://creativecommons.org/publicdomain/zero/1.0/' => 'unrestricted', 'http://www.freebsd.org/copyright/freebsd-license.html' => 'freebsd', 'http://www.gnu.org/licenses/old-licenses/fdl-1.2.html' => 'gfdl_1_2', 'http://www.gnu.org/copyleft/fdl.html' => 'gfdl_1_3', 'http://www.opensource.org/licenses/gpl-license.php' => 'gpl_1', 'http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt' => 'gpl_1', 'http://www.opensource.org/licenses/gpl-2.0.php' => 'gpl_2', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt' => 'gpl_2', 'http://www.opensource.org/licenses/gpl-3.0.html' => 'gpl_3', 'http://www.gnu.org/licenses/gpl-3.0.txt' => 'gpl_3', 'http://www.opensource.org/licenses/lgpl-license.php' => 'open_source', 'http://www.opensource.org/licenses/lgpl-2.1.php' => 'lgpl_2_1', 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt' => 'lgpl_2_1', 'http://www.opensource.org/licenses/lgpl-3.0.html' => 'lgpl_3_0', 'http://www.gnu.org/licenses/lgpl-3.0.txt' => 'lgpl_3_0', 'http://www.opensource.org/licenses/mit-license.php' => 'mit', 'http://www.mozilla.org/MPL/MPL-1.0.txt' => 'mozilla_1_0', 'http://www.mozilla.org/MPL/MPL-1.1.txt' => 'mozilla_1_1', 'http://opensource.org/licenses/mozilla1.1.php' => 'mozilla_1_1', 'http://www.openssl.org/source/license.html' => 'openssl', 'http://dev.perl.org/licenses/' => 'perl_5', 'http://www.opensource.org/licenses/postgresql' => 'open_source', 'http://trolltech.com/products/qt/licenses/licensing/qpl' => 'qpl_1_0', 'http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html' => 'ssleay', 'http://www.openoffice.org/licenses/sissl_license.html' => 'sun', 'http://www.zlib.net/zlib_license.html' => 'zlib', }->{ $_->uri }; push @r, $license_code if $license_code; } @r ? uniq(@r) : ('unknown'); } sub cpanmeta_resources { my $self = shift; my %resources; $resources{license} = [ map $_->uri, @{ $self->doap_project->license } ]; $resources{homepage} ||= $_->uri for @{ $self->doap_project->homepage }; my (@bug) = map $_->uri, $self->doap_project->bug_database; for (@bug) { if (/^mailto:(.+)/i) { $resources{bugtracker}{mailto} ||= $1; } else { $resources{bugtracker}{web} ||= $_; } } REPO: for my $repo (@{$self->doap_project->repository || []}) { if ($repo->location || $repo->browse) { my $r = {}; $r->{url} = $repo->location->uri if $repo->location; $r->{web} = $repo->browse->uri if $repo->browse; for my $type (@{ $repo->rdf_type || [] }) { $r->{type} ||= lc($1) if $type->uri =~ m{[/#](\w+)Repository$}; } if ($r->{web} =~ m{^https?://github.com/([^/]+)/([^/]+)$}) { $r->{url} ||= sprintf('git://github.com/%s/%s.git', $1, $2); $r->{type} ||= 'git'; } $resources{repository} = $r; last REPO; } } ($resources{x_mailinglist}) = map { $_->uri } grep defined, $self->doap_project->mailing_list; ($resources{x_wiki}) = map { $_->uri } grep defined, $self->doap_project->wiki; ($resources{x_identifier}) = map { $_->uri } grep defined, $self->doap_project->rdf_about; ($resources{x_IRC}) = map { $_->uri } grep defined, $self->model->objects(RDF::Trine::iri($self->project_uri), $CPAN->x_IRC); delete $resources{$_} for grep !defined $resources{$_}, keys %resources; return \%resources; } sub cpanmeta_keywords { my $self = shift; my $model = $self->model; my %keywords; CATEGORY: for my $cat (@{ $self->doap_project->category || [] }) { LABEL: for my $label ($model->objects_for_predicate_list($cat, $SKOS->prefLabel, $RDFS->label, $DOAP->name, $FOAF->name)) { next LABEL unless $label->is_literal; $keywords{ uc $label->literal_value } = $label->literal_value; next CATEGORY; } } sort values %keywords; } 1; ProcessDOAPDeps.pm000664001750001750 1356012410336614 21403 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::ProcessDOAPDeps; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; my $CPAN = RDF::Trine::Namespace->new('http://purl.org/NET/cpan-uri/terms#'); my $DC = RDF::Trine::Namespace->new('http://purl.org/dc/terms/'); my $DOAP = RDF::Trine::Namespace->new('http://usefulinc.com/ns/doap#'); my $DEPS = RDF::Trine::Namespace->new('http://ontologi.es/doap-deps#'); my $FOAF = RDF::Trine::Namespace->new('http://xmlns.com/foaf/0.1/'); my $NFO = RDF::Trine::Namespace->new('http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#'); my $SKOS = RDF::Trine::Namespace->new('http://www.w3.org/2004/02/skos/core#'); after PopulateMetadata => sub { my $self = shift; $self->log('Processing the DOAP Deps vocabulary'); $self->cpanterms_deps; $self->doap_deps; $self->doap_deps_features; }; sub cpanterms_deps { my $self = shift; my $meta = $self->metadata; my $model = $self->model; my $uri = 'RDF::Trine::Node::Resource'->new($self->project_uri); my @terms = qw(requires build_requires configure_requires test_requires recommends); my %term_map = ( requires => [ 'runtime', 'requires' ], build_requires => [ 'build', 'requires' ], configure_requires => [ 'configure', 'requires' ], test_requires => [ 'test', 'requires' ], recommends => [ 'runtime', 'recommends' ], ); foreach my $term (@terms) { my ($phase, $level) = @{$term_map{$term}}; my $Reqs; foreach my $dep ($model->objects($uri, $CPAN->$term)) { $Reqs ||= 'CPAN::Meta::Requirements'->from_string_hash($meta->{prereqs}{$phase}{$level} || {}); $self->log("WARNING: $term is deprecated in favour of http://ontologi.es/doap-deps#"); if ($dep->is_literal) { my ($mod, $ver) = split /\s+/, $dep->literal_value, 2; $ver ||= 0; no warnings; $meta->{prereqs}{$phase}{$level}->add_string_requirement($mod, $ver) unless $meta->{prereqs}{$phase}{$level}{$mod} > $ver; } else { $self->log("WARNING: Dunno what to do with ${dep}... we'll figure something out eventually."); } } $meta->{prereqs}{$phase}{$level} = $Reqs->as_string_hash if $Reqs; } } sub doap_deps { my $self = shift; my $meta = $self->metadata; my $model = $self->model; my $uri = 'RDF::Trine::Node::Resource'->new($self->project_uri); foreach my $phase (qw/ configure build test runtime develop /) { foreach my $level (qw/ requirement recommendation suggestion conflict /) { my $Reqs; my $term = "${phase}-${level}"; my $level2 = { requirement => 'requires', recommendation => 'recommends', suggestion => 'suggests', conflict => 'conflicts', }->{$level}; foreach my $dep ( $model->objects($uri, $DEPS->uri($term)) ) { $Reqs ||= 'CPAN::Meta::Requirements'->from_string_hash($meta->{prereqs}{$phase}{$level2} || {}); if ($dep->is_literal) { $self->log("WARNING: ". $DEPS->$term . " expects a resource, not literal $dep!"); next; } foreach my $ident ( $model->objects($dep, $DEPS->on) ) { unless ($ident->is_literal and $ident->has_datatype and $ident->literal_datatype eq $DEPS->CpanId->uri) { $self->log("WARNING: Dunno what to do with ${ident}... we'll figure something out eventually."); next; } my ($mod, $ver) = split /\s+/, $ident->literal_value, 2; $ver ||= 0; no warnings; $Reqs->add_string_requirement($mod => $ver); if ($phase eq 'runtime' and $level eq 'conflict') { $meta->{x_breaks}{$mod} = $ver; } } } $meta->{prereqs}{$phase}{$level2} = $Reqs->as_string_hash if $Reqs; } } } sub doap_deps_features { my $self = shift; my $meta = $self->metadata; my $model = $self->model; my $uri = 'RDF::Trine::Node::Resource'->new($self->project_uri); my %F; foreach my $feature ($model->objects($uri, $DEPS->feature)) { my %f; my ($label) = map $_->literal_value, grep $_->is_literal, $model->objects($feature, $DOAP->name); my ($desc) = map $_->literal_value, grep $_->is_literal, $model->objects($feature, $DOAP->shortdesc); my ($default) = map $_->literal_value, grep $_->is_literal, $model->objects($feature, $DEPS->x_default); die "Feature defined with no name: $feature" unless defined $label; $f{description} = $desc if defined $desc; $f{x_default} = 0+!!( lc($default||'') eq 'true' ); foreach my $phase (qw/ configure build test runtime develop /) { foreach my $level (qw/ requirement recommendation suggestion conflict /) { my $Reqs; my $term = "${phase}-${level}"; my $level2 = { requirement => 'requires', recommendation => 'recommends', suggestion => 'suggests', conflict => 'conflicts', }->{$level}; foreach my $dep ( $model->objects($feature, $DEPS->uri($term)) ) { $Reqs ||= 'CPAN::Meta::Requirements'->from_string_hash($meta->{optional_features}{$label}{$phase}{$level2} || {}); if ($dep->is_literal) { $self->log("WARNING: ". $DEPS->$term . " expects a resource, not literal $dep!"); next; } foreach my $ident ( $model->objects($dep, $DEPS->on) ) { unless ($ident->is_literal and $ident->has_datatype and $ident->literal_datatype eq $DEPS->CpanId->uri) { $self->log("WARNING: Dunno what to do with ${ident}... we'll figure something out eventually."); next; } my ($mod, $ver) = split /\s+/, $ident->literal_value, 2; $ver ||= 0; no warnings; $Reqs->add_string_requirement($mod => $ver); } } $f{prereqs}{$phase}{$level2} = $Reqs->as_string_hash if $Reqs; } } $F{$label} = \%f; } $meta->{optional_features} = \%F; } 1; RDFModel.pm000664001750001750 125612410336614 20060 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::RDFModel; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use Types::Standard -types; use namespace::autoclean; has model => ( is => 'ro', isa => InstanceOf['RDF::Trine::Model'], lazy => 1, builder => '_build_model', ); sub _build_model { require RDF::Trine; return 'RDF::Trine::Model'->temporary_model; } has doap_project => ( is => 'ro', isa => InstanceOf['RDF::DOAP::Project'], lazy => 1, builder => '_build_doap_project', ); sub _build_doap_project { my $self = shift; require RDF::DOAP::Project; 'RDF::DOAP::Project'->rdf_load( $self->project_uri, $self->model, ); } 1; ReadMetaDir.pm000664001750001750 120412410336614 20576 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::ReadMetaDir; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use RDF::TrineX::Functions 'parse'; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; after PopulateModel => sub { my $self = shift; for my $file ($self->sourcefile('meta')->children) { next unless $file =~ /\.(pret|pretdsl|ttl|turtle|nt|ntriples|rdf|rdfx)$/i; $self->log('Reading %s', $file); $file =~ /\.pret$/ ? do { require RDF::TrineX::Parser::Pretdsl; parse($file, into => $self->model, using => 'RDF::TrineX::Parser::Pretdsl'->new) }: parse($file, into => $self->model); } }; 1; WriteCOPYRIGHT.pm000664001750001750 2346712410336614 21077 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteCOPYRIGHT; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use List::MoreUtils qw( uniq ); use Path::Tiny qw( path ); use Path::Iterator::Rule; use Software::License; use Software::LicenseUtils; use Types::Standard -types; use namespace::autoclean; use constant FORMAT_URI => 'http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/'; my ($_serialize_file, $_serialize_stanza); BEGIN { $_serialize_file = sub { my $self = shift; return join "\n", map $_->to_string, ( $self->header, @{ $self->files }, @{ $self->license }, ); }; $_serialize_stanza = sub { my $self = shift; my $str; for my $f ($self->FIELDS) { my $F = join "-", map ucfirst, split "_", $f; my $v = $self->$f; if ($f eq 'body') { $v =~ s{^}" "mg; $str .= "$v\n"; } elsif (ref $v eq "ARRAY") { $v = join "\n " => @$v; $str .= "$F: $v\n"; } elsif (defined $v and length $v) { $v =~ s{^}" "mg; $str .= "$F:$v\n"; } } return $str; } }; #/BEGIN use MooX::Struct -rw, CopyrightFile => [ qw/ $header @files @license /, to_string => $_serialize_file, ], HeaderSection => [ qw/ $format $upstream_name $upstream_contact $source /, to_string => $_serialize_stanza, ], FilesSection => [ qw/ @files $copyright $license $comment /, to_string => $_serialize_stanza, ], LicenseSection => [ qw/ $license $body /, to_string => $_serialize_stanza, ], ; my %DEB = qw( Software::License::Apache_1_1 Apache-1.1 Software::License::Apache_2_0 Apache-2.0 Software::License::Artistic_1_0 Artistic-1.0 Software::License::Artistic_2_0 Artistic-2.0 Software::License::BSD BSD-3-clause Software::License::CC0_1_0 CC0 Software::License::GFDL_1_2 GFDL-1.2 Software::License::GFDL_1_3 GFDL-1.3 Software::License::GPL_1 GPL-1.0 Software::License::GPL_2 GPL-2.0 Software::License::GPL_3 GPL-3.0 Software::License::LGPL_2_1 LGPL-2.1 Software::License::LGPL_3_0 GPL-3.0 Software::License::MIT Expat Software::License::Mozilla_1_0 MPL-1.0 Software::License::Mozilla_1_1 MPL-1.1 Software::License::QPL_1_0 QPL-1.0 Software::License::Zlib Zlib ); my %URIS = ( 'http://www.gnu.org/licenses/agpl-3.0.txt' => 'AGPL_3', 'http://www.apache.org/licenses/LICENSE-1.1' => 'Apache_1_1', 'http://www.apache.org/licenses/LICENSE-2.0' => 'Apache_2_0', 'http://www.apache.org/licenses/LICENSE-2.0.txt' => 'Apache_2_0', 'http://www.perlfoundation.org/artistic_license_1_0' => 'Artistic_1_0', 'http://opensource.org/licenses/artistic-license.php' => 'Artistic_1_0', 'http://www.perlfoundation.org/artistic_license_2_0' => 'Artistic_2_0', 'http://opensource.org/licenses/artistic-license-2.0.php' => 'Artistic_2_0', 'http://www.opensource.org/licenses/bsd-license.php' => 'BSD', 'http://creativecommons.org/publicdomain/zero/1.0/' => 'CC0_1_0', 'http://www.freebsd.org/copyright/freebsd-license.html' => 'FreeBSD', 'http://www.gnu.org/copyleft/fdl.html' => 'GFDL_1_3', 'http://www.opensource.org/licenses/gpl-license.php' => 'GPL_1', 'http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt' => 'GPL_1', 'http://www.opensource.org/licenses/gpl-2.0.php' => 'GPL_2', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt' => 'GPL_2', 'http://www.opensource.org/licenses/gpl-3.0.html' => 'GPL_3', 'http://www.gnu.org/licenses/gpl-3.0.txt' => 'GPL_3', 'http://www.opensource.org/licenses/lgpl-2.1.php' => 'LGPL_2_1', 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt' => 'LGPL_2_1', 'http://www.opensource.org/licenses/lgpl-3.0.html' => 'LGPL_3_0', 'http://www.gnu.org/licenses/lgpl-3.0.txt' => 'LGPL_3_0', 'http://www.opensource.org/licenses/mit-license.php' => 'MIT', 'http://www.mozilla.org/MPL/MPL-1.0.txt' => 'Mozilla_1_0', 'http://www.mozilla.org/MPL/MPL-1.1.txt' => 'Mozilla_1_1', 'http://opensource.org/licenses/mozilla1.1.php' => 'Mozilla_1_1', 'http://www.openssl.org/source/license.html' => 'OpenSSL', 'http://dev.perl.org/licenses/' => 'Perl_5', 'http://www.opensource.org/licenses/postgresql' => 'PostgreSQL', 'http://trolltech.com/products/qt/licenses/licensing/qpl' => 'QPL_1_0', 'http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html' => 'SSLeay', 'http://www.openoffice.org/licenses/sissl_license.html' => 'Sun', 'http://www.zlib.net/zlib_license.html' => 'Zlib', ); eval("require Software::License::$_") for uniq values %URIS; has debian_copyright => ( is => 'ro', isa => InstanceOf[CopyrightFile], lazy => 1, builder => '_build_debian_copyright', ); our @Licences; sub _build_debian_copyright { my $self = shift; my @files = uniq('COPYRIGHT', sort $self->_get_dist_files); my $c = CopyrightFile->new( files => [], license => [], ); $c->header( HeaderSection->new( format => FORMAT_URI, upstream_name => $self->name, upstream_contact => Moose::Util::english_list(@{$self->metadata->{author}}), source => $self->metadata->{resources}{homepage}, ), ); local @Licences = (); local $; = "\034"; my %group_by; for my $f (@files) { my ($file, $copyright, $licence, $comment) = $self->_handle_file($f); push @{ $group_by{$copyright, $licence, (defined $comment ? $comment : '')} }, $file; } push @{ $c->files }, map { my $key = $_; my ($copyright, $licence, $comment) = split /\Q$;/; FilesSection->new( files => $group_by{$key}, copyright => $copyright, license => $licence, (comment => $comment)x(defined $comment), ); } sort { scalar(@{$group_by{$b}}) <=> scalar(@{$group_by{$a}}) } keys %group_by; my %seen; for my $licence (@Licences) { next if $seen{ref $licence}++; my $licence_name; if ((ref($licence) || '') =~ /^Software::License::(.+)/) { push @Licences, $licence; $licence_name = $DEB{ ref $licence } || $1; } else { $licence_name = "$licence"; } chomp( my $licence_text = $licence->notice ); push @{ $c->license }, LicenseSection->new( license => $licence_name, body => $licence_text, ); } $c; } sub _get_dist_files { my $self = shift; my $rule = 'Path::Iterator::Rule'->new->file; my $dir = $self->targetdir; map { path($_)->relative($dir) } $rule->all($dir); } sub _handle_file { my ($self, $f) = @_; my ($copyright, $licence, $comment) = $self->_determine_rights($f); return ($f, 'Unknown', 'Unknown') unless $copyright; my $licence_name; if ((ref($licence) || '') eq "Software::License::Perl_5") { push @Licences => ( "Software::License::Artistic_1_0"->new({holder => "the copyright holder(s)"}), "Software::License::GPL_1"->new({holder => "the copyright holder(s)"}), ); $licence_name = "GPL-1.0+ or Artistic-1.0"; } elsif ((ref($licence) || '') =~ /^Software::License::(.+)/) { push @Licences, $licence; $licence_name = $DEB{ ref $licence } || $1; } else { $licence_name = "$licence"; } return ($f, $copyright, $licence_name, $comment); } around _inherited_rights => sub { my $next = shift; my $self = shift; my ($f) = @_; my @licence_uris = @{$self->metadata->{resources}{license} || [] }; if (@licence_uris) { my $holders = Moose::Util::english_list( $self->can('doap_project') ? map($_->to_string('compact'), @{$self->doap_project->maintainer}) : @{$self->metadata->{author}} ); my $year = 1900 + (localtime)[5]; $year = 1900 + (localtime((stat $f)[9]))[5] if $f; for my $l (@licence_uris) { next unless exists $URIS{$l}; my $class = "Software::License::".$URIS{$l}; return ( sprintf("Copyright %d %s.", $year, $holders), $class->new({ holder => $holders, year => $year }), ); } } return $self->$next(@_); }; sub _determine_rights { my ($self, $f) = @_; if ($self->can('_determine_rights_from_rdf')) { if (my @rights = $self->_determine_rights_from_rdf($f)) { return @rights; } } if (my @rights = $self->_determine_rights_from_pod($f)) { return @rights; } if (my @rights = @{ $self->rights_for_generated_files->{$f} || [] }) { return @rights; } if ($f =~ m{\Alib/.*\.pm\z} or $f =~ m{\Abin/[\w_-]+(\.pl|\.PL)?\z} or $f =~ m{\At/.*(\.pm|\.t)\z} or $f eq 'dist.ini') { if (my @rights = $self->_inherited_rights($f)) { $self->log("Guessing copyright for file $f"); return @rights; } } $self->log("WARNING: Unable to determine copyright for file $f"); return; } sub _determine_rights_from_pod { my ($self, $f) = @_; return unless $f =~ /\.(?:pl|pm|pod|t)$/i; # For files in 'inc' try to figure out the normal (not stripped of pod) # module. # $f = $INC{$1} if $f =~ m{^inc/(.+\.pm)$}i && exists $INC{$1}; my $text = path($f)->absolute($self->targetdir)->slurp; my @guesses = 'Software::LicenseUtils'->guess_license_from_pod($text); if (@guesses) { my $copyright = join qq[\n], map { s/\s+$//; /[.?!]$/ ? $_ : "$_." } grep { /^Copyright/i or /^This software is copyright/ } split /(?:\r?\n|\r)/, $text; $copyright =~ s{E}{<}g; $copyright =~ s{E}{>}g; return( $copyright, $guesses[0]->new({holder => 'the copyright holder(s)'}), ) if $copyright && $guesses[0]; } return; } after BUILD => sub { my $self = shift; push @{ $self->targets }, 'COPYRIGHT'; # push rather than shift }; sub Build_COPYRIGHT { my $self = shift; my $file = $self->targetfile('COPYRIGHT'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'COPYRIGHT'} ||= [ 'None', 'public-domain' ] if $self->DOES('Dist::Inkt::Role::WriteCOPYRIGHT'); $file->spew_utf8( $self->debian_copyright->to_string ); } 1; WriteCREDITS.pm000664001750001750 265112410336614 20574 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteCREDITS; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; after PopulateMetadata => sub { my $self = shift; my @maint = $self->doap_project->gather_all_maintainers; push @{ $self->metadata->{author} ||= [] }, map "$_", @maint if @maint; my %already = map +($_ => 1), @maint; my @contrib = grep !$already{$_}, $self->doap_project->gather_all_contributors; push @{ $self->metadata->{x_contributors} ||= [] }, map "$_", @contrib if @contrib; }; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'CREDITS'; }; sub Build_CREDITS { my $self = shift; my $file = $self->targetfile('CREDITS'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'CREDITS'} ||= [ 'None', 'public-domain' ] if $self->DOES('Dist::Inkt::Role::WriteCOPYRIGHT'); my $fh = $file->openw_utf8; my %already; for my $role (qw/ maintainer contributor thanks /) { (my $method = "gather_all_${role}s") =~ s/ss$/s/s; my @peeps = sort { $a->to_string cmp $b->to_string } grep { blessed($_) and not $already{$_}++ } $self->doap_project->$method; next unless @peeps; printf {$fh} ("%s:\n", ucfirst $role); printf {$fh} ("- %s\n", $_->to_string) for @peeps; printf {$fh} ("\n"); } close($fh); } 1; WriteChanges.pm000664001750001750 121512410336614 21042 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteChanges; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'Changes'; }; sub Build_Changes { my $self = shift; my $file = $self->targetfile('Changes'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'Changes'} ||= [ $self->_inherited_rights ] if $self->DOES('Dist::Inkt::Role::WriteCOPYRIGHT'); $file->spew_utf8($self->doap_project->changelog); } 1; WriteDOAP.pm000664001750001750 157512410336614 20226 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteDOAP; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; use RDF::TrineX::Functions 'serialize'; use namespace::autoclean; with 'Dist::Inkt::Role::RDFModel'; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'DOAP'; }; sub Build_DOAP { my $self = shift; my $file = $self->targetfile('doap.ttl'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'doap.ttl'} ||= [ $self->_inherited_rights ] if $self->DOES('Dist::Inkt::Role::WriteCOPYRIGHT'); my $serializer = eval { require RDF::TrineX::Serializer::MockTurtleSoup; 'RDF::TrineX::Serializer::MockTurtleSoup'->new; } || 'RDF::Trine::Serializer::Turtle'->new; serialize( $self->model, to => $file->openw, using => $serializer, ); } 1; Changes.pm000664001750001750 161312410336614 20750 0ustar00taitai000000000000Dist-Inkt-DOAP-0.022/lib/Dist/Inkt/Role/Testuse 5.010001; use strict; use warnings; package Dist::Inkt::Role::Test::Changes; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.022'; use Moose::Role; with qw( Dist::Inkt::Role::Test Dist::Inkt::Role::RDFModel ); after BUILD => sub { my $self = shift; $self->setup_prebuild_test(sub { my $self = shift; $self->log("Checking DOAP changeset metadata is current"); my $latest_in_meta = $self->doap_project->sorted_releases->[-1]; $latest_in_meta = $latest_in_meta->revision if $latest_in_meta; if (!defined $latest_in_meta) { $self->log("No versions listed in DOAP"); die "Please update DOAP changelog"; } my $current_version = $self->version; unless ($self->version eq $latest_in_meta) { $self->log("Latest version according to DOAP metadata is $latest_in_meta, but this is $current_version"); die "Please update DOAP changelog"; } }); }; 1;