opalmod-0.2.2+nmu1/0000755000000000000000000000000012726106151010711 5ustar opalmod-0.2.2+nmu1/ARTISTIC0000644000000000000000000001373711173250416012070 0ustar 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 as specified below. "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 uunet.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) give non-standard executables non-standard names, and clearly document 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. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 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 whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. 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 opalmod-0.2.2+nmu1/AUTHORS0000644000000000000000000000023511173250416011760 0ustar ------------ Main Author: ------------ Ola Lundqvist Maintainer of the source and main author. ------------- Contributors: ------------- opalmod-0.2.2+nmu1/BUGS0000644000000000000000000000122711173250416011375 0ustar BUGS: ----- * setDebugLevel and setQuitLevel has to be used before any of the other functions will function correctly. (Should be fixed now). STRANGS THINGS: --------------- * The functions that are exported are not declared as they should. Ie no ($$;$) definitions. That is because there are some strange declaration errors there. (It may have something to do with autoload...) * There is an unnecessary use of POSIX qw(strftime) that should not be there. The strange thing is that it is required for the package to work. Strange! REPORT: ------- If you find a bug with this program, please let me know. Send a mail to the author at ola@inguza.com opalmod-0.2.2+nmu1/COPYING0000644000000000000000000001101311173250416011737 0ustar This program is licensed under the same terms of perl. The perl license is included below and in the including ARTISTIC and GPL files. ------------------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of either: 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" which comes with this Kit. 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 either the GNU General Public License or the Artistic License for more details. You should have received a copy of the Artistic License with this Kit, in the file named "ARTISTIC". If not, I'll be glad to provide one. You should also 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. For those of you that choose to use the GNU General Public License, my interpretation of the GNU General Public License is that no Perl script falls under the terms of the GPL unless you explicitly put said script under the terms of the GPL yourself. Furthermore, any object code linked with perl does not automatically fall under the terms of the GPL, provided such object code only adds definitions of subroutines and variables, and does not otherwise impair the resulting interpreter from executing any standard Perl script. I consider linking in C subroutines in this manner to be the moral equivalent of defining subroutines in the Perl language itself. You may sell such an object file as proprietary provided that you provide or offer to provide the Perl source, as specified by the GNU General Public License. (This is merely an alternate way of specifying input to the program.) You may also sell a binary produced by the dumping of a running Perl script that belongs to you, provided that you provide or offer to provide the Perl source as specified by the GPL. (The fact that a Perl interpreter and your code are in the same binary file is, in this case, a form of mere aggregation.) This is my interpretation of the GPL. If you still have concerns or difficulties understanding my intent, feel free to contact me. Of course, the Artistic License spells all this out for your protection, so you may prefer to use that. -------------------------------------------------------------------------- Perl is a language that combines some of the features of C, sed, awk and shell. See the manual page for more hype. There are also many Perl books available, covering a wide variety of topics, from various publishers. See pod/perlbook.pod for more information. Please read all the directions below before you proceed any further, and then follow them carefully. After you have unpacked your kit, you should have all the files listed in MANIFEST. Installation 1) Detailed instructions are in the file "INSTALL", which you should read if you are either installing on a system resembling Unix or porting perl to another platform. For non-Unix platforms, see the corresponding README. 2) Read the manual entries before running perl. 3) IMPORTANT! Help save the world! Communicate any problems and suggested patches to perlbug@perl.com so we can keep the world in sync. If you have a problem, there's someone else out there who either has had or will have the same problem. It's usually helpful if you send the output of the "myconfig" script in the main perl directory. If you've succeeded in compiling perl, the perlbug script in the "utils" subdirectory can be used to help mail in a bug report. If possible, send in patches such that the patch program will apply them. Context diffs are the best, then normal diffs. Don't send ed scripts-- I've probably changed my copy since the version you have. The latest versions of perl are always available on the various CPAN (Comprehensive Perl Archive Network) sites around the world. See . Just a personal note: I want you to know that I create nice things like this because it pleases the Author of my story. If this bothers you, then your notion of Authorship needs some revision. But you can use perl anyway. :-) The author. opalmod-0.2.2+nmu1/ChangeLog0000644000000000000000000000250111173250416012460 0ustar OpaL Perl Modules Copyright (C) 2000,2007 Ola Lundqvist $Id: ChangeLog 2561 2008-04-07 19:08:03Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://inguza.com/software/opalmod or contact the author at: ola@inguza.com ChangeLog: ---------- 2007-12-06 Updated copyright, homepage and email references. 2002-01-22 Added possibility to use function references in the action routines. The are optional, and default is exit. 2000-10-07 Prepared the package to be suitable for debian. 2000-08-21 Fixed so that the debian package are classified as all not any. 2000-08-20 Moved action in action.pm so that error messages are printed correctly. 2000-07-18 Possibly fixed OpaL::action bugs. Added debian release support. 2000-07-09 Added a new module OpaL::where for lotaing system resources like programs. Now only contains which. 2000-07-06 Added two more functions (getDebugLevel and getQuitLevel) to the action module and wrote some better documentation. Added two more functions (readfileline and readsclarcommand) to the read module. Documented all functions. 2000-07-03 Fixing some strange errors. 2000-06-27 15:57 Project started with the help of orm.pl opalmod-0.2.2+nmu1/GPL0000644000000000000000000004310311173250416011256 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, 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 licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU 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. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), 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 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 show them these terms so they know 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. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 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 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 derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 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 License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 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. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary 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 License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 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 Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing 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 for copying, distributing or modifying the Program or works based on it. 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. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. 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 this 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 this License, you may choose any version ever published by the Free Software Foundation. 10. 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 11. 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. 12. 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 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 the public, 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) 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 2 of the License, 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) year 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 is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. opalmod-0.2.2+nmu1/Makefile0000644000000000000000000000145412726105304012354 0ustar PREFIX=/usr/local # This includes the install.... build: # Generate makefiles. (cd OpaL/where;perl Makefile.PL INSTALLDIRS=vendor) (cd OpaL/read;perl Makefile.PL INSTALLDIRS=vendor) (cd OpaL/dir;perl Makefile.PL INSTALLDIRS=vendor) (cd OpaL/manipulate;perl Makefile.PL INSTALLDIRS=vendor) (cd OpaL/action;perl Makefile.PL INSTALLDIRS=vendor) # Then do the real make. for part in where read dir manipulate action; do \ $(MAKE) -C OpaL/$$part OPTIMIZE="-O2 -g -Wall"; \ done install: for part in where read dir manipulate action; do \ $(MAKE) -C OpaL/$$part install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX); \ done rm -f $(DESTDIR)$(prefix)/share/man/man3/.exists* clean: for part in where read dir manipulate action; do \ [ ! -f OpaL/$$part/Makefile ] || $(MAKE) -C OpaL/$$part realclean; \ done opalmod-0.2.2+nmu1/OpaL/0000755000000000000000000000000012726106151011544 5ustar opalmod-0.2.2+nmu1/OpaL/action/0000755000000000000000000000000012726106151013021 5ustar opalmod-0.2.2+nmu1/OpaL/action/Makefile.PL0000644000000000000000000000120011173250416014763 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'OpaL::action', 'VERSION_FROM' => 'action.pm', # finds $VERSION 'PM' => { 'action.pm' => '$(INST_LIBDIR)/action.pm' } ); opalmod-0.2.2+nmu1/OpaL/action/action.pm0000644000000000000000000002755611173250416014652 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of either: # # 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" which comes with this Kit. # # 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 either # the GNU General Public License or the Artistic License for more details. # # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # package OpaL::action; #use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use POSIX qw(strftime); require Exporter; @ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw(); @EXPORT_OK = qw(pdebug exitlvl action cmdaction setDebugLevel setQuitLevel getDebugLevel getQuitLevel setErrorHandler); # If you are using CVS/RCS this can be quite handy. #$VERSION = do{my@r=q$Revision: 1.31 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; # If that is not what you want use this instead. Will be rewritten by # create release. my $version = '0.01'; $VERSION = $version; ############################################################################### ############################ PACKAGE GLOBALS ################################## ############################################################################### # First exported ones (those in @EXPORT or @EXPORT_OK) # No exportet variables. # Then package other global ones. (not exported ones) # Can be accessed through $OpaL::action::variablename # No such too. # All file-scooped variables must be created before any method that uses them. my %ERRLVL = ( 1 => 'Critical', 2 => 'Error', 3 => 'Warning', 4 => 'Message', 5 => 'Debug' ); my $debuglvl = 3; my $qlvl = 2; my $errorHandler; ############################################################################### ########################### PRELOADED METHODS ################################# ############################################################################### # Preloaded methods go here. ############################################################################### # Name: setErrorHandler # Description: Sets the error handler function. # Arguments: $function (no arguments). # Author: Ola Lundqvist # Date: 2002-01-22 ############################################################################### sub setErrorHandler (&) { ($errorHandler) = @_; } ############################################################################### # Name: setDebugLevel # Description: Sets the debug level to something. # Arguments: $level (1 to 5) # Changes: The localy scooped $debuglvl # Author: Ola Lundqvist # Date: 2000-05-01 ############################################################################### sub setDebugLevel ($) { $debuglvl = shift; } ############################################################################### # Name: getDebugLevel # Description: returns the debug level. # Author: Ola Lundqvist # Date: 2000-07-06 ############################################################################### sub getDebugLevel () { return $debuglvl; } ############################################################################### # Name: setQuitLevel # Description: Sets the quit level to something. # Arguments: $level (1 to 5) # Changes: The localy scooped $qlvl # Author: Ola Lundqvist # Date: 2000-05-01 ############################################################################### sub setQuitLevel ($) { $qlvl = shift; } ############################################################################### # Name: getQuitLevel # Description: returns the quit level. # Author: Ola Lundqvist # Date: 2000-07-06 ############################################################################### sub getQuitLevel () { return $qlvl; } ############################################################################### # Name: pdebug # Description: Prints a debug message and exit the program if the level are # to critical. # Arguments: $level, $message, [exit ref function] # Uses: exitlvl # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-05-04 Minor modifications. # 2000-06-27 Removed comment. # 2002-01-22 Added exit ref function. ############################################################################### sub pdebug ($$;&) { my ($lvl,$message,$ref) = @_; if ($debuglvl >= $lvl) { if ($message !~ /\n$/) { $message = $message . "\n"; } print ("$ERRLVL{$lvl}: $message"); } exitlvl($lvl,$ref); return; } ############################################################################### # Name: exitlvl # Description: Exit the program if the level are to critical. # Arguments: $level, [exit ref function] # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-06-27 Added argument definition ($). # 2002-01-22 Added exit ref function. # 2009-03-16 Make sure to exit with error code and not 0. ############################################################################### sub exitlvl ($;&) { my ($lvl, $ref) = @_; if ($qlvl >= $lvl) { if (! defined $ref) { $ref = $errorHandler; } if (! defined $ref) { print "EXIT: $lvl\n" if ($debuglvl >= $lvl); exit $lvl; } if ($ref =~ /^$/ || $ref =~ /exit/i) { print "EXIT: $lvl\n" if ($debuglvl >= $lvl); exit $lvl; } elsif ("CODE" == ref $ref) { &$ref; } elsif ("SCALAR" == ref $ref) { &$ref; } else { print "EXIT: $lvl\n" if ($debuglvl >= $lvl); print("Really strange error handler: (".(ref $ref).") ".$ref); exit $lvl; } } } ############################################################################### # Name: action # Description: If eval is true then print out an error message. # Arguments: $eval, $message, [$errlvl default 2], [exit ref function] # Uses: pdebug # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-06-27 Added a $ to make sure that errlvl is ok. # Added argument definition ($$:$). # 2000-07-09 Layout changes and a bug fix. (From orat.) # 2002-01-22 Added exit ref function. ############################################################################### sub action ($$;$&) { my ($eval, $message, $errlvl,$ref) = @_; if ($errlvl =~ /^\s*$/) { $errlvl = 2; } if ($eval) { &pdebug($errlvl,"$message\n",$ref); } else { &pdebug(5,"$message\n",$ref); } } ############################################################################### # Name: cmdaction # Description: If system(command) is erronious then call action. # Arguments: $command, $message, [$errorlevel default 2], [$quiet] # Uses: pdebug, action # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-05-19 Fixed quietcmd? # 2000-06-27 Added a $ to make sure that errlvl is ok. # Added argument definition ($$:$). # 2000-07-06 More readable argument getting. # 2002-01-22 Better error handling. ############################################################################### sub cmdaction ($$;$$&) { my ($cmd, $message, $errlvl, $qt, $ref) = @_; if ($errlvl =~ /^\s*$/) { $errlvl = 2; } if ($qt =~ /^\s*$/) { $qt = 0; } if ($message !~ /\n$/) { $message = $message . "\n"; } &pdebug(4,$message); &pdebug(5,"CMD: $cmd\n"); my $quietcmd = ""; my $tcmd = $cmd; while ($tcmd =~ /\"[^\"]*\"/) { $tcmd =~ s/\"[^\"]*\"//; } if ($tcmd !~ />/) { $quietcmd = " \> /dev/null" if ($debuglvl == 4 || $qt == 1); $quietcmd = " \> /dev/null 2\>\&1" if ($debuglvl < 4); $quietcmd = "" if ($qt == 2); } &action(system("$cmd$quietcmd"),$message,$errlvl,$ref); } # Autoload methods go after =cut, and are processed by the autosplit program. # Modules must return true. 1; __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### # Below is the stub of documentation for your module. You better edit it! =head1 NAME OpaL::action - Perl extension for easier handling of what information that should be presented when a action is made. =head1 SYNOPSIS use OpaL::action qw(functionnames); No functions or variables are exported automaticly so you have to specify them here. =head1 DESCRIPTION OpaL::action is a module to allow some better bugtracking and information to be sent to the user/developer. All functions are autoloaded so they will not be loaded into memory if you have not used them before. There are 5 different levels of the information/action. =over 4 =item 1 critical =item 2 error =item 3 warning =item 4 message =item 5 debug =back =head1 FUNCTIONS =over 4 =item B You can set on what errorlevel the program should exit if an error occur. The default level is 2 and you canges it like this: USAGE: C(level); =item B You can set an alternative error handler function (no arguments). The default one is exit. USAGE: C(\funcname); =item B You can set on what errorlevel the program should output messages if an error occur. The debug level indicates what type of information that should be presented to the user. USAGE: C(level); =item B You can set on what errorlevel the program should exit if an error occur. USAGE: $foo = C; =item B You can get the debuglevel on which the program should output messages, if an error occurs. USAGE: $foo = C; =item B You can set on what errorlevel the program should exit if an error occur. With the pdebug method you can present information and mark it with a debuglevel using: USAGE: C(level, "A sample informational text." [,funcref]); =item B With this function you can handle and print a message if a function does not work correctly. It will exit the program and print a message with the error level before if the action returns true and if the action_critic is lower or equal to the set error level. If the debug level is high enough it will present the message but without the trailing error message. USAGE: C(some_action, "A sample informational text about the action.", how_critical [,funcref]); The last parameter (how_critical) is optional. =item B Actually the same as B with the difference that it executes a external command instead. It is almost identical to action(system"a command to execute", ...); USAGE: C("a command to execute.", "A sample informational text about the action.", how_critical, how_quiet [,funcref]); The two last parameter (how_critical) is optional. The last parameter tells how quiet the executing command should be: 0 - extremely quiet (ie: >& /dev/null) 1 - quiet (ie: >& /dev/null) 2 - everything sent to stdout. =back =head1 AUTHOR Ola Lundqvist =head1 SEE ALSO perl(1). =cut ############################################################################### ########################### AUTOLOAD METHODS ################################## ############################################################################### opalmod-0.2.2+nmu1/OpaL/action/test.pl0000644000000000000000000000173411173250416014341 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use OpaL::action; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): opalmod-0.2.2+nmu1/OpaL/dir/0000755000000000000000000000000012726106151012322 5ustar opalmod-0.2.2+nmu1/OpaL/dir/Makefile.PL0000644000000000000000000000116411173250416014275 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'OpaL::dir', 'VERSION_FROM' => 'dir.pm', # finds $VERSION 'PM' => { 'dir.pm' => '$(INST_LIBDIR)/dir.pm' } ); opalmod-0.2.2+nmu1/OpaL/dir/dir.pm0000644000000000000000000001120011173250416013427 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of either: # # 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" which comes with this Kit. # # 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 either # the GNU General Public License or the Artistic License for more details. # # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # package OpaL::dir; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use OpaL::action qw(pdebug action); use POSIX qw(strftime); require Exporter; @ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw( ); @EXPORT_OK = qw(getdirlist); # If you are using CVS/RCS this can be quite handy. #$VERSION = do{my@r=q$Revision: 1.13 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; # If that is not what you want use this instead. Will be rewritten by # create release. my $version = '0.01'; $VERSION = $version; ############################################################################### ############################ PACKAGE GLOBALS ################################## ############################################################################### # First exported ones (those in @EXPORT or @EXPORT_OK) # Then package other global ones. (not exported ones) # Can be accessed through $OpaL::dir::variablename # All file-scooped variables must be created before any method that uses them. # my $myvar = ''; ############################################################################### ########################### PRELOADED METHODS ################################# ############################################################################### # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. # Modules must return true. 1; __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### # Below is the stub of documentation for your module. You better edit it! =head1 NAME OpaL::dir - Perl extension for directory access. =head1 SYNOPSIS use OpaL::dir qw(getdirlist); @list = getdirlist($directory); =head1 DESCRIPTION OpaL::dir is a module for directory access in a bit more advanced manner than the ordinary perl module for directory access. =head1 FUNCTIONS =over 4 =item B Returns a list containing all files in the directory you have specified. It will look for all files recursivly. It will also exclude all CVS/* files, "." and ".." directories. USAGE: @list = C($directoryname); =back =head1 AUTHOR Ola Lundqvist =head1 REQUIRES This package requires OpaL::action so you have to make sure that that perl module is installed. =head1 SEE ALSO L perl(1) =cut ############################################################################### ########################### AUTOLOAD METHODS ################################## ############################################################################### ############################################################################### # Name: getdirlist # Description: Get the filenames for a directory, recursive. # Argument: A directory name. # Returns: A list of filenames. # Author: Ola Lundqvist # Date: 2000-05-13 # 2000-06-29 Argument definition. ############################################################################### sub getdirlist {#($) { pdebug(5,"Entering getdirlist."); my $dir,@t = (); while ($dir = shift) { &action(! (opendir (D,$dir)), "Trying to open $dir."); my $k; while ($k = readdir(D)) { if (-f "$dir/$k") { if ($k !~ /~$/ && $k !~ /^#.*#$/ ) { push @t, "$dir/$k"; } } elsif (-d "$dir/$k") { if ($k !~ /^\.+$/ && $k !~ /CVS/ ) { push @_, "$dir/$k"; } } } } return @t; } opalmod-0.2.2+nmu1/OpaL/dir/test.pl0000644000000000000000000000173111173250416013637 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use OpaL::dir; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): opalmod-0.2.2+nmu1/OpaL/manipulate/0000755000000000000000000000000012726106151013703 5ustar opalmod-0.2.2+nmu1/OpaL/manipulate/Makefile.PL0000644000000000000000000000122011173250416015647 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'OpaL::manipulate', 'VERSION_FROM' => 'manipulate.pm', # finds $VERSION 'PM' => { 'manipulate.pm' => '$(INST_LIBDIR)/manipulate.pm' } ); opalmod-0.2.2+nmu1/OpaL/manipulate/manipulate.pm0000644000000000000000000001754411173250416016412 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of either: # # 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" which comes with this Kit. # # 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 either # the GNU General Public License or the Artistic License for more details. # # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # package OpaL::manipulate; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use POSIX qw(strftime); require Exporter; @ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw( ); @EXPORT_OK = qw(perlmodifyadvanced perlmodify perlmodify_insertafter); # If you are using CVS/RCS this can be quite handy. #$VERSION = do{my@r=q$Revision: 1.14 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; # If that is not what you want use this instead. Will be rewritten by # create release. my $version = '0.01'; $VERSION = $version; ############################################################################### ############################ PACKAGE GLOBALS ################################## ############################################################################### use OpaL::action qw(pdebug cmdaction); use OpaL::read qw(readscalarfile); # First exported ones (those in @EXPORT or @EXPORT_OK) # Then package other global ones. (not exported ones) # Can be accessed through $OpaL::manipulate::variablename # All file-scooped variables must be created before any method that uses them. # my $myvar = ''; ############################################################################### ########################### PRELOADED METHODS ################################# ############################################################################### # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. # Modules must return true. 1; __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### # Below is the stub of documentation for your module. You better edit it! =head1 NAME OpaL::manipulate - Perl extension for manipulating files. =head1 SYNOPSIS use OpaL::manipulate qw(functions); No functions or variables are exported automaticly so you have to specify them here. =head1 DESCRIPTION OpaL::manipulate is a module for manipulating files. All functions are autoloaded so they will not be loaded into memory if you have not used them before. =head1 FUNCTIONS =over 4 =item B It simply applies the script to the file to change its content. You also have to apply a message to tell what you are doing mostly for debugging and if any error occures. The error level tells how critical this action is to the script. USAGE: C("file", "script", "message", errorlevel); The errorlevel is optional. =item B It simply fixes some stuff in the script string and then calls perlmodifyadvanced. USAGE: C("file", "script", "message", errorlevel); The errorlevel is optional. =item B This function searches for something (regular expression). It if is found it inserts the text after it. But it will never insert the text twice. You also have to apply a message to tell what you are doing mostly for debugging and if any error occures. The error level tells how critical this action is to the script. USAGE: C("file", "find", "text", "message", errorlevel); The errorlevel is optional. =back =head1 AUTHOR Ola Lundqvist =head1 REQUIRES B, B. =head1 SEE ALSO L L perl(1) =cut ############################################################################### ########################### AUTOLOAD METHODS ################################## ############################################################################### ############################################################################### # Name: perlmodifyadvanced # Description: Modifiles a (text)file with the help of a perl-script. # eg. perl -pi -e script file. # Arguments: $file, $script, $message [, $level ] # Uses: system, perl, cmdaction # Author: Ola Lundqvist # Date: 2000-05-04 Written # 2000-05-13 Better argument definition. # 2000-06-29 Added argument definition. ############################################################################### sub perlmodifyadvanced {#($$$;$) { my $file = shift; my $script = shift; my $message = shift; my $level = shift; &cmdaction("perl -pi -e \'$script\' $file", $message, $level); } ############################################################################### # Name: perlmodify # Description: Modifiles a (text)file with the help of a perl-script. # eg. perl -pi -e script file. And makes some fixes before. # Arguments: $file, $script, $message [, $level ] # Uses: system, perl, cmdaction # Author: Ola Lundqvist # Date: 2000-05-04 Written # 2000-05-13 Better argument definition. # 2000-06-04 Added some fixes to make it more secure. # 2000-06-29 Added argument definition. ############################################################################### sub perlmodify {#($$$;$) { my ($file, $script, $message, $level) = @_; $script =~ s/\@/\\\@/g; $script =~ s/\%/\\\%/g; $script =~ s/\$([a-z]A-Z)/\\\$$1/g; &perlmodifyadvanced($file, $script, $message, $level); } ############################################################################### # Name: perlmodify_insertafter # Description: Mdifiles a (text)file with the help of a perl-script. # eg. perl -pi -e script file. # Arguments: $file, $find, $text, $message [, $level ] # Uses: perlmodify # Author: Ola Lundqvist # Date: 2000-05-04 # 2000-06-04 Fixed so that insert after do not make # repeated inserts. (never ever) # 2000-06-29 Added argument definition. ############################################################################### sub perlmodify_insertafter {#($$$$;$) { my $file = shift; my $find = shift; my $insert = shift; $insert =~ s/\$/\\\$/g; $insert =~ s/\n$//; my $message = shift; my $level = shift; my $data = &readscalarfile("$file"); my $test = "$find$insert"; $data =~ s/\$//g; $test =~ s/\$//g; $data =~ s/\*//g; $test =~ s/\*//g; $data =~ s/\+//g; $test =~ s/\+//g; $data =~ s/\-//g; $test =~ s/\-//g; $data =~ s/\@//g; $test =~ s/\@//g; $data =~ s/\%//g; $test =~ s/\%//g; $data =~ s/\n//g; $test =~ s/\n//g; $data =~ s/\///g; $test =~ s/\///g; $data =~ s/\(//g; $test =~ s/\(//g; $data =~ s/\)//g; $test =~ s/\)//g; $data =~ s/\[//g; $test =~ s/\]//g; $data =~ s/\.//g; $test =~ s/\.//g; $data =~ s/\s+/ /g; $test =~ s/\s+/ /g; if ($data !~ /$test/) { &perlmodify("$file", "s|($find)|\$1$insert|", $message, $level); } else { pdebug(5, "Information already exists."); } } opalmod-0.2.2+nmu1/OpaL/manipulate/test.pl0000644000000000000000000000174011173250416015220 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use OpaL::manipulate; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): opalmod-0.2.2+nmu1/OpaL/read/0000755000000000000000000000000012726106151012457 5ustar opalmod-0.2.2+nmu1/OpaL/read/Makefile.PL0000644000000000000000000000117011173250416014427 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'OpaL::read', 'VERSION_FROM' => 'read.pm', # finds $VERSION 'PM' => { 'read.pm' => '$(INST_LIBDIR)/read.pm' } ); opalmod-0.2.2+nmu1/OpaL/read/read.pm0000644000000000000000000001731512014772134013737 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of either: # # 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" which comes with this Kit. # # 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 either # the GNU General Public License or the Artistic License for more details. # # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # package OpaL::read; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use POSIX qw(strftime); require Exporter; @ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw( ); @EXPORT_OK = qw(readfile readscalarfile readfileline readcommand readscalarcommand readcommandline); # If you are using CVS/RCS this can be quite handy. #$VERSION = do{my@r=q$Revision: 1.11 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; # If that is not what you want use this instead. Will be rewritten by # create release. my $version = '0.01'; $VERSION = $version; ############################################################################### ############################ PACKAGE GLOBALS ################################## ############################################################################### # First exported ones (those in @EXPORT or @EXPORT_OK) # Then package other global ones. (not exported ones) # Can be accessed through $OpaL::read::variablename # All file-scooped variables must be created before any method that uses them. # my $myvar = ''; ############################################################################### ########################### PRELOADED METHODS ################################# ############################################################################### # Preloaded methods go here. ############################################################################### # Name: readcommand # Description: Executes a program and read the piped result. # Returns: Array of lines. # Arguments: $command_string # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-06-27 Better argument definition. ############################################################################### sub readcommand {#($) { my $cmd = shift; open C, "$cmd |"; my @t = ; close (C); return @t; } ############################################################################### # Name: readfile # Description: Reads a file. # Returns: Array of lines. # Arguments: $filename # Author: Ola Lundqvist # Date: 2000-05-13 # 2000-06-25 Removed &action from open. Not working. # 2000-06-27 Better argument definition. # Removed errlvl. ############################################################################### sub readfile {#($) { my $file = shift; open C, $file; my @t = ; close (C); return @t; } ############################################################################### # Name: readfileline # Description: Reads a file. # Returns: The first line. # Arguments: $filename # Author: Ola Lundqvist # Date: 2000-05-13 # 2000-07-06 Removed &action from open. Not working. # Better argument definition. # Removed errlvl. ############################################################################### sub readfileline { #($){ my $file = shift; open C, $file; my $t = ; close (C); return $t; } ############################################################################### # Name: readscalarfile # Description: Reads a file. # Returns: Entire file in scalar. # Arguments: $filename # Author: Ola Lundqvist # Date: 2000-05-13 # 2000-06-25 Removed &action from open. Not working. # 2000-06-27 Better argument definition. # Removed errlvl. ############################################################################### sub readscalarfile {#($) { my $file = shift; open C, $file; my $m = $/; undef $/; my $t = ; close (C); $/ = $m; return $t; } ############################################################################### # Name: readscalarcommand # Description: Reads a command output into a scalar. # Returns: Entire file in scalar. # Arguments: $command # Author: Ola Lundqvist # Date: 2000-06-27 Wrote it. ############################################################################### sub readscalarcommand {#($) { my $cmd = shift; open C, "$cmd |"; my $m = $/; undef $/; my $t = ; close (C); $/ = $m; return $t; } ############################################################################### # Name: readcommandline # Description: Executes a program and read the piped result. # Returns: The first line. # Arguments: $command_string # Author: Ola Lundqvist # Date: 2000-05-01 # 2000-06-27 Better argument definition. ############################################################################### sub readcommandline {#($) { my $cmd = shift; open C, "$cmd |"; my $t = ; close (C); return $t; } # Autoload methods go after =cut, and are processed by the autosplit program. # Modules must return true. 1; __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### # Below is the stub of documentation for your module. You better edit it! =head1 NAME OpaL::read - Perl extension for reading files and commands. =head1 SYNOPSIS use OpaL::read qw(functions); No functions or variables are exported automaticly so you have to specify them here. =head1 DESCRIPTION OpaL::read is used for reading files and commands. All functions are autoloaded so they will not be loaded into memory if you have not used them before. =head1 FUNCTIONS =over 4 =item B Reads the content of the specified file and returns a list with the all lines. USAGE: @foo = C($filename); =item B Reads the first line of the specified file and returns a scalar with that line. USAGE: $foo = C($filename); =item B Reads the content of the specified file and returns a scalar with the entire content. USAGE: $foo = C("filename"); =item B Reads the content from the output of the specified command and returns a list with the all lines. USAGE: @foo = C("command"); =item B Reads the first line from output of the specified command and returns a scalar with that line. USAGE: $foo = C("command)"; =item B Reads the content for the output of the specified file and returns a scalar with the entire content. USAGE: $foo = C($command); =back =head1 AUTHOR Ola Lundqvist =head1 SEE ALSO perl(1). =cut ############################################################################### ########################### AUTOLOAD METHODS ################################## ############################################################################### opalmod-0.2.2+nmu1/OpaL/read/test.pl0000644000000000000000000000173211173250416013775 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use OpaL::read; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): opalmod-0.2.2+nmu1/OpaL/where/0000755000000000000000000000000012726106151012656 5ustar opalmod-0.2.2+nmu1/OpaL/where/Makefile.PL0000644000000000000000000000117411173250416014632 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'OpaL::where', 'VERSION_FROM' => 'where.pm', # finds $VERSION 'PM' => { 'where.pm' => '$(INST_LIBDIR)/where.pm' } ); opalmod-0.2.2+nmu1/OpaL/where/test.pl0000644000000000000000000000206411173250416014173 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use OpaL::where qw(which); $loaded = 1; my $t = which("perl"); print "ok 1\n" if (defined $t); print "not ok 1\n" if (! defined $t); ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): opalmod-0.2.2+nmu1/OpaL/where/where.pm0000644000000000000000000001023611173250416014327 0ustar #!/usr/bin/perl # OpaL Perl Modules # Copyright (C) 2000,2007-2008 Ola Lundqvist # # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of either: # # 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" which comes with this Kit. # # 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 either # the GNU General Public License or the Artistic License for more details. # # # For more information take a look at the official homepage at: # http://inguza.com/software/opalmod # or contact the author at: # ola@inguza.com # package OpaL::where; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use POSIX qw(strftime); require Exporter; @ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw( ); @EXPORT_OK = qw(which); # If you are using CVS/RCS this can be quite handy. #$VERSION = do{my@r=q$Revision: 1.4 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; # If that is not what you want use this instead. Will be rewritten by # create release. my $version = '0.01'; $VERSION = $version; ############################################################################### ############################ PACKAGE GLOBALS ################################## ############################################################################### # First exported ones (those in @EXPORT or @EXPORT_OK) # Then package other global ones. (not exported ones) # Can be accessed through $OpaL::where::variablename # All file-scooped variables must be created before any method that uses them. # my $myvar = ''; ############################################################################### ########################### PRELOADED METHODS ################################# ############################################################################### # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. # Modules must return true. 1; __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### # Below is the stub of documentation for your module. You better edit it! =head1 NAME OpaL::where - Perl extension for locating system resources. =head1 SYNOPSIS use OpaL::where qw(which); =head1 DESCRIPTION OpaL::where is a module for locating system resources. =head1 FUNCTIONS =over 4 =item B Which takes a program name and searches for that in the PATH environment variable and returns the path to the executable. If no program is found with that name undef is returned instead. This is similar to the program with the same name. See L. USAGE: $t = C("perl"); =back =head1 AUTHOR Ola Lundqvist =head1 SEE ALSO perl(1), which(1). =cut ############################################################################### ########################### AUTOLOAD METHODS ################################## ############################################################################### ############################################################################### # Name: which # Description: Searches for a program in the PATH. Returns the path to the # file if found, undef else. # Arguments: A program to search for. # Requres: $ENV{'PATH'} # Author: Ola Lundqvist # Date: 2000-07-09 Wrote it! ############################################################################### sub which { my $s = shift; my $d; foreach $d (split /:/, $ENV{'PATH'}) { if (-f "$d/$s") { return "$d/$s"; } } return undef; } opalmod-0.2.2+nmu1/README0000644000000000000000000000326612726105616011605 0ustar OpaL Perl Modules COPYRIGHT and LICENSE: ---------------------- Copyright (C) 2000-2012,2016 Ola Lundqvist For full COPYRIGHT notice see the COPYING document. This program is free software; you can redistribute it and/or modify it under the terms of either: 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" which comes with this Kit. 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 either the GNU General Public License or the Artistic License for more details. Contact information: -------------------- If you want more information about the program or updated versions, visit the official homepage at: http://inguza.com/software/opalmod or contact the author at: ola@inguza.com DESCRIPTION: ------------ OpaL Perl Modules is a collection of useful modules for various tasks. Now there is four modules. * OpaL::action - For safer execution and easier debugging. * OpaL::dir - For more powerful directory access. * OpaL::manipulate - For manipulating files. * OpaL::read - For reading files and command outputs. * OpaL::where - For locating system resources like programs. If you want more information there is a manpage for each module. FEATURES: --------- * Documented. * Functions to use :) REFERENCES: ----------- For more information see the manpages: man OpaL::dir man OpaL::manipulate man OpaL::action man OpaL::read man OpaL::where opalmod-0.2.2+nmu1/debian/0000755000000000000000000000000013774411522012140 5ustar opalmod-0.2.2+nmu1/debian/changelog0000644000000000000000000001146113774411522014015 0ustar opalmod (0.2.2+nmu1) unstable; urgency=medium * Non maintainer upload by the Reproducible Builds team. * No source change upload to rebuild on buildd with .buildinfo files. -- Holger Levsen Sun, 03 Jan 2021 19:56:18 +0100 opalmod (0.2.2) unstable; urgency=low * Changed from debhelper compatibility level 4 to 9. Closes: #817605. * Changed to new debian/rules style with overrides. Had to fix a few build problems to get that working. -- Ola Lundqvist Wed, 08 Jun 2016 22:52:46 +0200 opalmod (0.2.1) unstable; urgency=low * Making sure that OpaL::read::readfile is exported properly. Pure functions can not be exported this way anymore. Closes: #626154. -- Ola Lundqvist Tue, 21 Aug 2012 22:51:43 +0200 opalmod (0.2.0) unstable; urgency=low * Corrected so that an error code is returned on exit. Closes: #517693. Feature update. * Updated to standards version 3.8.0. * Fixed so that the clean target can fail. * Fixed DH_COMPACT migration. -- Ola Lundqvist Mon, 16 Mar 2009 20:18:09 +0100 opalmod (0.1.16) unstable; urgency=low * Updated upstream address from opalsys.net to inguza.com. -- Ola Lundqvist Mon, 7 Apr 2008 21:04:37 +0200 opalmod (0.1.15) unstable; urgency=low * Updated homepage, license and email references. -- Ola Lundqvist Thu, 6 Dec 2007 20:40:47 +0100 opalmod (0.1.14) unstable; urgency=low * Update of FSF addresses in copyright files and some cleanup in documentation. * Moved debhelper from build-depends-indep to build-depends. * Updated to standards version 3.7.2. * Updated to debhelper 4 compatibility. * Added binary arch target. -- Ola Lundqvist Mon, 10 Jul 2006 00:04:17 +0200 opalmod (0.1.13) unstable; urgency=low * Updated description, closes: #211186. * Updated standards version to 3.6.1. -- Ola Lundqvist Sat, 14 Aug 2004 22:54:52 +0200 opalmod (0.1.12) unstable; urgency=low * Added patch from Marc Brockschmidt that fixes a critical build issue, closes: #253745. -- Ola Lundqvist Tue, 06 Jul 2004 00:14:27 +0200 opalmod (0.1.11) unstable; urgency=low * Updated description so it is easier to understand, closes: #209908. -- Ola Lundqvist Mon, 15 Sep 2003 21:54:49 +0200 opalmod (0.1.10) unstable; urgency=low * Fixed strange exit error message, closes: #163071, #135901. * Removed full stop from short description line. -- Ola Lundqvist Wed, 5 Feb 2003 18:23:27 +0100 opalmod (0.1.9) unstable; urgency=low * Fixed bashism in the perl script. Thanks to Michal Cihar for the patch, closes: #179332. * Removed version requirement for perl build dependencies. -- Ola Lundqvist Sat, 1 Feb 2003 20:37:01 +0100 opalmod (0.1.8) unstable; urgency=low * Updated for perl 5.8. * Updated standards version from 3.5.2 to 3.5.8. * Not using dh_suidregister any more. * Fixed copyright issue. -- Ola Lundqvist Fri, 24 Jan 2003 09:32:06 +0100 opalmod (0.1.7) unstable; urgency=low * Removed unnecessary suggestions, closes: #143216. -- Ola Lundqvist Tue, 13 Aug 2002 11:05:31 +0200 opalmod (0.1.6) unstable; urgency=low * Fixed error message in some cases. -- Ola Lundqvist Wed, 23 Jan 2002 22:19:56 +0100 opalmod (0.1.5) unstable; urgency=low * Added the possibility to hook on function references to the action routines. * Added build dependencies. * Updated the standards version. * Changed the upstream homepage from to www.opal.dhs.org. * Changed my email address everywhere to opal@debian.org. * Fixed other lintian errors. * Made it a debian native pacakge, because I will contiue to be the maintainer and no dramatic changes will be done anyway. * Removed configure files. -- Ola Lundqvist Wed, 23 Jan 2002 10:09:56 +0100 opalmod (0.1.4-1) unstable; urgency=low * Initial debian upload. * Automodification by orm. Relased a new version. -- Ola Lundqvist Sun, 21 Aug 2000 09:17:36 +0200 opalmod (0.1.3-2) unstable; urgency=low * Automodification by orm. Relased a new version. -- Ola Lundqvist Sun, 21 Aug 2000 09:17:36 +0200 opalmod (0.1.3-1) unstable; urgency=low * Automodification by orm. Relased a new version. -- Ola Lundqvist Sun, 20 Aug 2000 14:52:22 +0200 opalmod (0.1.2-1) unstable; urgency=low * Automodification by orm. Relased a new version. -- Ola Lundqvist Wed, 19 Jul 2000 12:44:03 +0200 opalmod (0.0.0-1) unstable; urgency=low * Initial Release. -- Ola Lundqvist Wed, 19 Jul 2000 10:22:05 +0200 opalmod-0.2.2+nmu1/debian/compat0000644000000000000000000000000212726102712013330 0ustar 9 opalmod-0.2.2+nmu1/debian/control0000644000000000000000000000073511173250416013542 0ustar Source: opalmod Section: devel Priority: optional Maintainer: Ola Lundqvist Standards-Version: 3.8.0 Build-Depends-Indep: perl Build-Depends: debhelper (>> 4.0.0) Package: opalmod Architecture: all Depends: ${perl:Depends} Description: A set of Perl modules for various tasks OpaL Perl Modules is a set of perl modules used for various tasks: * Exception handle emulation. * Simplified file and command read functions. * Simplified debugging support. opalmod-0.2.2+nmu1/debian/copyright0000644000000000000000000000074612726105603014076 0ustar This package was debianized by Ola Lundqvist on Wed, 19 Jul 2000 10:22:05 +0200. Upstream homepage: http://inguza.com/software/opalmod Copyright: ---------- Copyright (c) 2000-2012,2016 Ola Lundqvist License: -------- This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Perl is distributed both under GPL and the Artistic license. They can both be found at /usr/share/common-licenses/. opalmod-0.2.2+nmu1/debian/docs0000644000000000000000000000002411173250416013001 0ustar README AUTHORS BUGS opalmod-0.2.2+nmu1/debian/rules0000755000000000000000000000020712726104541013213 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_install: echo "Testing" $(MAKE) install DESTDIR=$(CURDIR)/debian/opalmod PREFIX=/usr opalmod-0.2.2+nmu1/opalmod.spec0000644000000000000000000000433511173250416013224 0ustar %define name opalmod %define ver 0.1.3 %define prefix /usr Summary: A set of modules to be used in my other projects. Name: %name Version: %ver Release: 2 Copyright: PERL Group: devel Source: http://inguza.com/software/opalmod/%{name}-%{ver}.tar.gz URL: http://inguza.com/software/opalmod BuildArchitectures: noarch Packager: Ola Lundqvist BuildRoot: /var/tmp/%{name}-%{ver}-root %description OpaL Perl Modules is a set of perl modules used for various tasks. %changelog * Sun Aug 20 2000 Ola Lundqvist - Updated spec to version 0.1.3 (autoupdate by orm) * Wed Jul 19 2000 Ola Lundqvist - Updated spec to version 0.1.2 (autoupdate by orm) * Sun Jul 09 2000 Ola Lundqvist - Added build, install and filespec for OpaL::where (autoupdate by orm) - Updated spec to version 0.1.1 (autoupdate by orm) * Thu Jul 07 2000 Ola Lundqvist - Updated spec to version 0.1.0 (autoupdate by orm) * Tue Jun 06 2000 Ola Lundqvist - Added build, install and filespec for OpaL::read, OpaL::dir, OpaL::manipulate - and OpaL::action (autoupdate by orm) %prep %setup -q -n %{name}-%{ver} %build automake autoconf ./configure --prefix=/usr %install make DESTDIR=$RPM_BUILD_ROOT install cd $RPM_BUILD_ROOT/usr/man/man3/;mv OpaL::where.3pm OpaL::where.3 cd $RPM_BUILD_ROOT/usr/man/man3/;mv OpaL::read.3pm OpaL::read.3 cd $RPM_BUILD_ROOT/usr/man/man3/;mv OpaL::dir.3pm OpaL::dir.3 cd $RPM_BUILD_ROOT/usr/man/man3/;mv OpaL::manipulate.3pm OpaL::manipulate.3 cd $RPM_BUILD_ROOT/usr/man/man3/;mv OpaL::action.3pm OpaL::action.3 %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-,root,root) %{prefix}/man/man3/OpaL::where.3 %{prefix}/lib/perl5/OpaL/where.pm %{prefix}/lib/perl5/auto/OpaL/where/* %{prefix}/man/man3/OpaL::read.3 %{prefix}/lib/perl5/OpaL/read.pm %{prefix}/lib/perl5/auto/OpaL/read/* %{prefix}/man/man3/OpaL::dir.3 %{prefix}/lib/perl5/OpaL/dir.pm %{prefix}/lib/perl5/auto/OpaL/dir/* %{prefix}/man/man3/OpaL::manipulate.3 %{prefix}/lib/perl5/OpaL/manipulate.pm %{prefix}/lib/perl5/auto/OpaL/manipulate/* %{prefix}/man/man3/OpaL::action.3 %{prefix}/lib/perl5/OpaL/action.pm %{prefix}/lib/perl5/auto/OpaL/action/* %doc NEWS README ChangeLog INSTALL TODO COPYING BUGS opalmod-0.2.2+nmu1/patches/0000755000000000000000000000000012726106151012340 5ustar opalmod-0.2.2+nmu1/patches/bug-253745-buildfix.patch0000644000000000000000000000601311173250416016510 0ustar diff -wru opalmod-0.1.11/debian/rules opalmod-0.1.11-0.1/debian/rules --- opalmod-0.1.11/debian/rules 2003-02-01 20:37:17.000000000 +0100 +++ opalmod-0.1.11-0.1/debian/rules 2004-07-02 15:11:11.000000000 +0200 @@ -36,7 +36,7 @@ dh_installdirs # Add here commands to install the package into debian/tmp. - $(MAKE) install DESTDIR=`pwd`/debian/opalmod + $(MAKE) install DESTDIR=$(CURDIR)/debian/opalmod PREFIX=/usr # Build architecture-independent files here. binary-indep: build install diff -wru opalmod-0.1.11/Makefile opalmod-0.1.11-0.1/Makefile --- opalmod-0.1.11/Makefile 2002-01-23 11:25:17.000000000 +0100 +++ opalmod-0.1.11-0.1/Makefile 2004-07-02 15:10:51.000000000 +0200 @@ -1,5 +1,4 @@ -prefix=/usr -dir=lib/perl5 +PREFIX=/usr/local # This includes the install.... install: @@ -10,31 +9,14 @@ (cd OpaL/manipulate;perl Makefile.PL INSTALLDIRS=vendor) (cd OpaL/action;perl Makefile.PL INSTALLDIRS=vendor) -# First fix things. -# Rewrite rules for lib. - #(cd OpaL/where;perl -pi -e "s#blib/lib#$(DESTDIR)$(prefix)/$(dir)#g;" Makefile) - #(cd OpaL/read;perl -pi -e "s#blib/lib#$(DESTDIR)$(prefix)/$(dir)#g;" Makefile) - #(cd OpaL/dir;perl -pi -e "s#blib/lib#$(DESTDIR)$(prefix)/$(dir)#g;" Makefile) - #(cd OpaL/manipulate;perl -pi -e "s#blib/lib#$(DESTDIR)$(prefix)/$(dir)#g;" Makefile) - #(cd OpaL/action;perl -pi -e "s#blib/lib#$(DESTDIR)$(prefix)/$(dir)#g;" Makefile) -# Rewrite rules for man3 - #(cd OpaL/where;perl -pi -e "s#blib/man3#$(DESTDIR)$(prefix)/share/man/man3#g;" Makefile) - #(cd OpaL/read;perl -pi -e "s#blib/man3#$(DESTDIR)$(prefix)/share/man/man3#g;" Makefile) - #(cd OpaL/dir;perl -pi -e "s#blib/man3#$(DESTDIR)$(prefix)/share/man/man3#g;" Makefile) - #(cd OpaL/manipulate;perl -pi -e "s#blib/man3#$(DESTDIR)$(prefix)/share/man/man3#g;" Makefile) - #(cd OpaL/action;perl -pi -e "s#blib/man3#$(DESTDIR)$(prefix)/share/man/man3#g;" Makefile) - # Then do the real make. - (cd OpaL/where;$(MAKE) OPTIMIZE="-O2 -g -Wall"; $(MAKE) install PREFIX=$(CURDIR)/debian/opalmod/usr) - (cd OpaL/read;$(MAKE) OPTIMIZE="-O2 -g -Wall"; $(MAKE) install PREFIX=$(CURDIR)/debian/opalmod/usr) - (cd OpaL/dir;$(MAKE) OPTIMIZE="-O2 -g -Wall"; $(MAKE) install PREFIX=$(CURDIR)/debian/opalmod/usr) - (cd OpaL/manipulate;$(MAKE) OPTIMIZE="-O2 -g -Wall"; $(MAKE) install PREFIX=$(CURDIR)/debian/opalmod/usr) - (cd OpaL/action;$(MAKE) OPTIMIZE="-O2 -g -Wall"; $(MAKE) install PREFIX=$(CURDIR)/debian/opalmod/usr) + for part in where read dir manipulate action; do \ + $(MAKE) -C OpaL/$$part OPTIMIZE="-O2 -g -Wall"; \ + $(MAKE) -C OpaL/$$part install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX); \ + done rm -f $(DESTDIR)$(prefix)/share/man/man3/.exists* clean: - (cd OpaL/where; $(MAKE) realclean; rm -Rf *blib Makefile) - (cd OpaL/read; $(MAKE) realclean; rm -Rf *blib Makefile) - (cd OpaL/dir; $(MAKE) realclean; rm -Rf *blib Makefile) - (cd OpaL/manipulate; $(MAKE) realclean; rm -Rf *blib Makefile) - (cd OpaL/action; $(MAKE) realclean; rm -Rf *blib Makefile) + for part in where read dir manipulate action; do \ + $(MAKE) -C OpaL/$$part realclean; \ + done