pax_global_header00006660000000000000000000000064115316473170014522gustar00rootroot0000000000000052 comment=d9f9422bea14cc5934e85a4fc3694659b9a6cca7 spectacle-0.22/000077500000000000000000000000001153164731700134105ustar00rootroot00000000000000spectacle-0.22/.gitignore000066400000000000000000000001461153164731700154010ustar00rootroot00000000000000*.py[oc] *.bak *.swp *~ *.spec spectacle/__version__.py spectacle/spec/*.py spectacle/dsc/*.py build/ spectacle-0.22/AUTHORS000066400000000000000000000001161153164731700144560ustar00rootroot00000000000000Anas Nashif (anas.nashif@intel.com) Jian-feng Ding (jian-feng.ding@intel.com) spectacle-0.22/COPYING000066400000000000000000000431141153164731700144460ustar00rootroot00000000000000 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 Library 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. spectacle-0.22/Makefile000066400000000000000000000017341153164731700150550ustar00rootroot00000000000000VERSION = $(shell cat VERSION) TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/") ifeq ($(VERSION), $(TAGVER)) TAG = $(TAGVER) else TAG = "HEAD" endif all: tmpls python setup.py build tmpls: cd spectacle/spec; $(MAKE) cd spectacle/dsc; $(MAKE) tag: git tag $(VERSION) dist-bz2: git archive --format=tar --prefix=spectacle-$(VERSION)/ $(TAG) | \ bzip2 > spectacle-$(VERSION).tar.bz2 dist-gz: git archive --format=tar --prefix=spectacle-$(VERSION)/ $(TAG) | \ gzip > spectacle-$(VERSION).tar.gz doc: markdown README > README.html test: cd tests/; python alltest.py install: all install-data python setup.py install develop: all install-data python setup.py develop install-data: install -d ${DESTDIR}/usr/share/spectacle/ install -m 644 data/*csv ${DESTDIR}/usr/share/spectacle/ install -m 644 data/GROUPS ${DESTDIR}/usr/share/spectacle/ clean: rm -rf build/ rm -f README.html cd spectacle/spec; $(MAKE) clean cd spectacle/dsc; $(MAKE) clean spectacle-0.22/README000066400000000000000000000316441153164731700143000ustar00rootroot00000000000000# Spectacle Tutorial ## Introduction Spectacle is the toolset for packaging maintenance of MeeGo, including the tool to generate spec files from metadata file in YAML format, and tools to convert spec files or spec-builder's ini files to YAML format. For spectacle managed packages, all generic packaging information will be stored in the YAML file, and it also allows maintaining customizations in the spec file directly with special enclosure tags. Three separated tools will be installed: * specify: the tool to generate or to update spec file, based on YAML * ini2spectacle: the tool to convert spec-builder .ini to YAML and new spec file * spec2spectacle: the tool to convert original spec to YAML and new spec file ## Installation ### Instruction Several methods available for spectacle installation: * rpm/deb packages for several supported Linux distributions From [MeeGo Repos](http://repo.meego.com/tools/repo/), repo urls can be found for: * MeeGo * Fedora 10,11,12 * openSUSE(s) * xUbuntu 8.10/9.04/9.10 * Debian 5.0 * Download the latest source package, and install it by ``make install`` (Only running ``setup.py install`` is not enough!) The latest code in git tree can be accessed at: [git tree](git://gitorious.org/meego-developer-tools/spectacle.git) ### Requirements * python 2.x, above 2.5 * PyYAML, the python module for YAML parsing * cheetah, one popular templating system for python
In many linux distributions, the package may be named as python-cheetah. ## Usage ### specify Usage: specify [options] [yaml-path] Options: --version show program's version number and exit -h, --help show this help message and exit -o OUTFILE_PATH, --output=OUTFILE_PATH Path of output spec file -s, --skip-scm Skip to check upstream SCM when specified in YAML -N, --not-download Do not try to download newer source files -n, --non-interactive Non interactive running, to use default answers ### ini2spectacle Usage: ini2spectacle [options] [ini-path] Options: --version show program's version number and exit -h, --help show this help message and exit -o OUTFILE_PATH, --output=OUTFILE_PATH Path of output yaml file -f, --include-files To store files list in YAML file ### spec2spectacle Usage: spec2spectacle [options] [spec-path] Options: --version show program's version number and exit -h, --help show this help message and exit -o OUTFILE_PATH, --output=OUTFILE_PATH Path of output yaml file -r, --replace-macros To replace self-defined macros in spec file --no-builder-parsing Do NOT try to parse build/install scripts -f, --include-files To store files list in YAML file ## Syntax of spectacle YAML The syntax of YAML can be refered here: Two example spectacle YAML files are placed to examples/ directory in source code: * xfce4-session.yaml, a real world sample with most of the elements * general.yaml, a fake spectacle contains all the available elements, with comments All available directives for spectacle are listed as the following: * Name: **string** * Summary: **string** * Version: **string**, version string * Release: **string** * Epoch: **string**, *optional* * Group: **string** * License: **string** * URL: **string**, *optional* * BuildArch: **string**, *optional* * ExclusiveArch: **string**, *optional* * Prefix: **string**, *optional* * LocaleName: **string**, *optional* * LocaleOptions: **string**, *optional* * Description: **text**, *optional* * Sources: **list** of **string** * SourcePrefix: **string**, *optional*, specify the prefix path in source package * ExtraSources: **list** of **string**, *optional* * SetupOptions: **string**, *optional*, the options string for %setup * Patches: **list** of **string**, all patches need to be in 'p1' level * Requires: **list** of **string** * RequiresPre: **list** of **string** * RequiresPreUn: **list** of **string** * RequiresPost: **list** of **string** * RequiresPostUn: **list** of **string** * PkgBR: **list** of **string**, packages required in building, or BuildRequires * PkgConfigBR: **list** of **string**, pkg-config requires in building * Provides: **list** of **string** * Conflicts: **list** of **string** * Obsoletes: **list** of **string** * BuildConflicts: **list** of **string** * Configure: **string**, *optional*, valid values: **autogen**, **configure**, **reconfigure**, **none**
**If not specified, the default value "configure" will be used** * ConfigOptions: **list**, *optional*, extra options for ``Configure`` * Builder: **string**, *optional*, valid values: **make**, **single-make**, **python**, **perl**, **qmake**, **none**
**If not specified, the deault value "make" will be used. If do not want a automatic builder, please use "none".** * QMakeOptions: **list**, *optional*, extra options for **qmake** ``Builder`` * Files: **list** of **string**, *optional*, content of ``%files`` for small packages * FilesInput: **string**, *optional*, extra input source for %files * NoFiles: **boolean**, *optional*, if to be set as True, means no %files section for this package and it cause no rpm generated * RunFdupes: **string**, path under %buildroot to run ``%fdupes`` macro in %install * RpmLintIgnore: **list**, *optional*, list of skip items for ``rpmlint`` * Check: **boolean**, whether need ``%check`` section in spec * SupportOtherDistros: **boolean**, whether need to check for other distros (besides MeeGo) * UseAsNeeded: **boolean**, whether export LD\_AS\_NEEDED=1 environ variable before building * NoAutoReq: **boolean**, whether add 'AutoReq: 0' to spec * NoAutoProv: **boolean**, whether add 'AutoProv: 0' to spec * NoSetup: **boolean**, whether to skip using ``%setup`` in ``%prep`` * NoAutoLocale: **boolean**, whether to use ``%find_lang`` to search locale data when found 'intltool' in PkgBR * NoDesktop: **boolean**, whether to install the desktop files in package * UpdateDesktopDB: **boolean**, whether to run 'update-desktop-database' to flush cache when package (un)installation * NoIconCache: **boolean**, whether to run 'gtk-update-icon-cache' if icon files found in package * AutoDepend: **boolean**, for subpackages only, whether to add Require to main package automatically * AsWholeName: **boolean**, for subpackages only, whether to use **Name** as the whole package name * AutoSubPackages: **list** of **string**, mainly for '-devel' * SubPackages: **list** of **dict**, the **dict** item is the lower level directives for sub packages: * Name * Summary * Description, *optional* * Group, *optional* * License, *optional* * Requires, *optional* * etc. **CAUTION**: The following cases of value string have special meaning in YAML syntax: * string with leading **``%``** charactor * string with leading **``*``** charactor * string contains **``:``** charactor and one or more spaces/tabs after **``:``** * string end with **``:``** charactor **Then these string values need to be quoted by ``'``(single-quote) or ``"`` (double-quote), and the choice of quote char should not conflict with the value string self.** ## Mandatory and valid keywords for all packages ### Mandatory keywords The following keywords are mandatory for main package: * Name * Summary * Description * Version * Group * License The following keywords are mandatory for sub-package: * Name * Summary * Description * Group ### Valid keywords for sub-packages For sub-packages, only a subset of keywords can be specified: * Name * Summary * Description * Group * License * Version * Release * Epoch * URL * BuildArch * Files * Prefix * Requires * RequiresPre * RequiresPreUn * RequiresPost * RequiresPostUn * Provides * Conflicts * Obsoletes * NoAutoReq * NoAutoProv * NoAutoReqProv * NoIconCache * FilesInput ### Keywords only for sub-packages The following keywords are only valid for sub-packages: * AsWholeName * AutoDepend ## Namespace support for multi-architecture in several keywords For the following spectacle YAML keywords: * Requires * PkgBR * PkgConfigBR * Patches * ConfigOptions * QMakeOptions If one of the items need to be architecture specified, we can add arch prefix to it. The supported prefix and the corresponding architectures as the followings: * ``ix86:`` - x86 platform * ``arm:`` - generic arm platform * ``armv5:`` - armv5 platform, will expand to "armv5el armv5tel armv5tejl" * ``armv7:`` - armv7 platform, will expand to "armv7el armv7tel armv7l armv7hl armv7nhl" Here's some samples: Requires: - arm:pkg-need-in-arm-image - ix86:pkg-need-in-x86-image - normal-pkg ConfigOptions: - arm:--arm-specific-opt - ix86:--ix86-specific-opt - --common-opt ## Customizations in spec Generated spec files by specify will have many placeholders for customizations, such as: # >> build pre # << build pre You can add any custom code between the markers, next time when you run ``specify``, the text between the markers will be kept as is, all other sections relying on the meta data from the YAML file will be changed depending on the values in the YAML file. The following placeholders in spec can be customized: * Private Macros, used in this package's spec With placeholder: # >> macros # << macros * Extra setup scripts in the last of ``%prep`` With placeholder: # >> setup # << setup * Pre-Build, scripts before package building With placeholder: # >> build pre # << build pre * Post-Build, scripts after package building With placeholder: # >> build post # << build post * Pre-Install, scripts before package installation With placeholder: # >> install pre # << install pre * Post-Install, scripts after package installation With placeholder: # >> install post # << install post * Files, files list in packaged rpm With placeholder: # >> files [[-p] sub-package] # << files [[-p] sub-package] **NOTE**: "sub-packge" stands for the name of sub-package, and it is optional. If no sub-package name specified, it means the files of **main** package. **NOTE**: If the file list is simple enough, you can use YAML *Files* keyword instead to record it. * Scripts for %check section With placeholder: # >> check # << check **NOTE**: Only if YAML boolean *Check* is specifed as ``yes``, %check with placeholder lines will be generated in .spec. * Scriptlets for %pre section With placeholder: # >> pre # << pre **NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %pre scripts, it need be added manually, and only once. * Scriptlets for %preun section With placeholder: # >> preun # << preun **NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %preun scripts, it need be added manually, and only once. * Scriptlets for %post section With placeholder: # >> post # << post **NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %post scripts, it need be added manually, and only once. * Scriptlets for %postun section With placeholder: # >> postun # << postun **NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %postun scripts, it need be added manually, and only once. ## Internal Implementation Spectacle uses cheetah templates to generate the spec file, based the metadata from YAML file. But the end users need not tackle it. ## Tips * If to upgrade the pkg to a newer version, you can just edit the version string in spectacle YAML file, and when you run ``specify``, it will download the needed files for you automatically. * For packages with locale data, *LocaleName* is needed. If package maintainers cannot confirm whether there are locale files, they can just do not use *LocaleName* at first, and whenever "unpackaged files" rpm packaging errors encountered, it means *LocaleName* should be added. And please do not use it for packages without locale data to keep them clean, though it will not block the building and packaging. * When using spec2spectacle/ini2spectacle to generate spectacle, the following problems should be checked: * Remove duplicate Requires(include pre/post/preun/postun) which were added automatically based on the analysis of file list. * Review and clean up the reserved scripts in "build|install pre|post" sections in new generated spec file. * User can use "series.conf" file to specify multiple patches under package directory. The "series.conf" can be used by ``quilt`` and the content can be updated to spec automatically when running ``specify``. spectacle-0.22/TODO000066400000000000000000000017731153164731700141100ustar00rootroot00000000000000Topic - [ ] Maintain a list of Licenses (to be provided ) and check if the rpm license in the yaml/spec is valid and if it is one of those supported in MeeGo - [ ] Speculate: - [ ] This is a tool that basically helps generate yaml files - [ ] Point it to a tar ball and maybe some other hints and it will create a basic yaml file from the data it can extract from the tar and other web services like freshmeat - [ ] From the tar: - [ ] Examine configure scripts and look for pkgconfig dependencies and add them for BuildRequire - [ ] Extract name of package version from tar file - [ ] Examine other files in the tar that can provide additional data, for example from doc/ - [ ] Guess file list - [ ] Web services (Freshmeat, sourceforge , etc.) - [ ] Check web service for the package and its descriptions, category, license etc. - [ ] Other data can be extracted from the web... spectacle-0.22/VERSION000066400000000000000000000000051153164731700144530ustar00rootroot000000000000000.22 spectacle-0.22/data/000077500000000000000000000000001153164731700143215ustar00rootroot00000000000000spectacle-0.22/data/GROUPS000066400000000000000000000041461153164731700152700ustar00rootroot00000000000000Amusements/Games Amusements/Graphics Applications/Archiving Applications/Communications Applications/Databases Applications/Editors Applications/Emulators Applications/Engineering Applications/File Applications/Internet Applications/Multimedia Applications/Productivity Applications/Publishing Applications/System Applications/Text Development/Debuggers Development/Languages Development/Libraries Development/System Development/Tools Documentation System/Boot System/Console System/I18n/Chinese System/I18n/Japanese System/I18n/Korean System/Packages System/Base System/Daemons System/Kernel System/Libraries System/Shells System/X11 System/X11/Fonts System/X11/Icons System/GUI/XFCE System/GUI/Other System/GUI/GNOME Communications/Cellular Adaptation Communications/Cellular Framework Communications/Telephony and IM Communications/Bluetooth Communications/Connectivity Adaptation Communications/ConnMan Data Management/Content Framework Development Platform/Platform SDK Essentials/Base Essentials Graphics/Font Management Graphics/Display and Graphics Adaptation Graphics/Input Adaptation Graphics/Open GL ES Graphics/X11 Kernel/Linux Kernel Location/Location Framework Location/Location Adaptation Multimedia/Audio Adaptation Multimedia/Camera Adaptation Multimedia/Gstreamer Multimedia/Imaging and Video Adaptation Multimedia/Imaging Codecs Multimedia/PulseAudio Multimedia/Sharing Multimedia/UPnP Personal Information Management/Backup Framework Personal Information Management/Calendar Engine Personal Information Management/Contacts Engine Personal Information Management/Email Engine Personal Information Management/Synchronization Framework Qt/Qt Qt/Qt Mobility Qt/Qt WebKit Security/Accounts Security/Certificate Manager Security/Integrity Protection Framework Security/Access Control Framework Security/Single Sign-On Security/SW Distribution Security Security/Security Adaptation oftware Management/Package Manager System/Context Framework System/NGF System/Resource Policy System/Sensor Adaptation System/Sensor Framework System/Startup Services System/System Control System/Device Mode Adaptation System/Vibra and Haptics Adaptation spectacle-0.22/data/pkgconfig-provides.csv000066400000000000000000001075221153164731700206450ustar00rootroot00000000000000ConsoleKit-devel,pkgconfig(ck-connector) GConf-dbus-devel,pkgconfig(gconf-2.0) ImageMagick-c++-devel,pkgconfig(ImageMagick++) ImageMagick-c++-devel,pkgconfig(Magick++) ImageMagick-devel,pkgconfig(ImageMagick) ImageMagick-devel,pkgconfig(MagickCore) ImageMagick-devel,pkgconfig(MagickWand) ImageMagick-devel,pkgconfig(Wand) ORBit2-devel,pkgconfig(ORBit-2.0) ORBit2-devel,pkgconfig(ORBit-CosNaming-2.0) ORBit2-devel,pkgconfig(ORBit-idl-2.0) ORBit2-devel,pkgconfig(ORBit-imodule-2.0) OpenCV-devel,pkgconfig(opencv) OpenEXR-devel,pkgconfig(OpenEXR) PackageKit-glib-devel,pkgconfig(packagekit-glib2) PackageKit-qt-devel,pkgconfig(packagekit-qt) SDL-devel,pkgconfig(sdl) SDL_Pango-devel,pkgconfig(SDL_Pango) SDL_gfx-devel,pkgconfig(SDL_gfx) SDL_image-devel,pkgconfig(SDL_image) SDL_mixer-devel,pkgconfig(SDL_mixer) WebKit-gtk-devel,pkgconfig(webkit-1.0) WiMAX-Network-Service-devel,pkgconfig(libiWmxSdk-0) aiksaurus-devel,pkgconfig(aiksaurus-1.0) aiksaurus-devel,pkgconfig(gaiksaurus-1.0) alsa-lib-devel,pkgconfig(alsa) anerley-devel,pkgconfig(anerley) anjuta-devel,pkgconfig(libanjuta-1.0) anthy-devel,pkgconfig(anthy) apr-devel,pkgconfig(apr-1) apr-util-devel,pkgconfig(apr-util-1) art-sharp2,pkgconfig(art-sharp-2.0) aspell-devel,pkgconfig(aspell) at-spi-devel,pkgconfig(cspi-1.0) at-spi-devel,pkgconfig(libloginhelper-1.0) at-spi-devel,pkgconfig(libspi-1.0) atk-devel,pkgconfig(atk) attica-devel,pkgconfig(libattica) audiofile-devel,pkgconfig(audiofile) augeas-devel,pkgconfig(augeas) autogen-devel,pkgconfig(autoopts) autotrace-devel,pkgconfig(autotrace) avahi-compat-howl-devel,pkgconfig(avahi-compat-howl) avahi-compat-howl-devel,pkgconfig(howl) avahi-compat-libdns_sd-devel,pkgconfig(avahi-compat-libdns_sd) avahi-compat-libdns_sd-devel,pkgconfig(libdns_sd) avahi-devel,pkgconfig(avahi-client) avahi-devel,pkgconfig(avahi-core) avahi-glib-devel,pkgconfig(avahi-glib) avahi-gobject-devel,pkgconfig(avahi-gobject) avahi-ui-devel,pkgconfig(avahi-ui) babl-devel,pkgconfig(babl) banshee-1-devel,pkgconfig(banshee-1-collection-indexer) banshee-1-devel,pkgconfig(banshee-1-core) banshee-1-devel,pkgconfig(banshee-1-hyena) banshee-1-devel,pkgconfig(banshee-1-hyena-data-sqlite) banshee-1-devel,pkgconfig(banshee-1-hyena-gui) banshee-1-devel,pkgconfig(banshee-1-lastfm) banshee-1-devel,pkgconfig(banshee-1-lastfm-gui) banshee-1-devel,pkgconfig(banshee-1-mono-media) banshee-1-devel,pkgconfig(banshee-1-musicbrainz) banshee-1-devel,pkgconfig(banshee-1-nowplaying) banshee-1-devel,pkgconfig(banshee-1-services) banshee-1-devel,pkgconfig(banshee-1-thickclient) bickley-devel,pkgconfig(bickley-0.4) bind-devel,pkgconfig(libbind) bisho-devel,pkgconfig(bisho) bluez-libs-devel,pkgconfig(bluez) bognor-regis-devel,pkgconfig(bognor-regis-0.6) brasero-devel,pkgconfig(libbrasero-burn) brasero-devel,pkgconfig(libbrasero-media) bugle-devel,pkgconfig(bugle) buteo-sync-plugins-devel,pkgconfig(syncmlcommon) buteo-syncfw-devel,pkgconfig(synccommon) buteo-syncfw-devel,pkgconfig(syncfwclient) buteo-syncfw-devel,pkgconfig(syncpluginmgr) buteo-syncfw-devel,pkgconfig(syncprofile) buteo-syncml-devel,pkgconfig(meegosyncml) c-ares-devel,pkgconfig(libcares) cairo-devel,pkgconfig(cairo) cairo-devel,pkgconfig(cairo-fc) cairo-devel,pkgconfig(cairo-ft) cairo-devel,pkgconfig(cairo-gl) cairo-devel,pkgconfig(cairo-glx) cairo-devel,pkgconfig(cairo-gobject) cairo-devel,pkgconfig(cairo-pdf) cairo-devel,pkgconfig(cairo-png) cairo-devel,pkgconfig(cairo-ps) cairo-devel,pkgconfig(cairo-svg) cairo-devel,pkgconfig(cairo-xlib) cairo-devel,pkgconfig(cairo-xlib-xrender) cairomm-devel,pkgconfig(cairomm-1.0) cairomm-devel,pkgconfig(cairomm-ft-1.0) cairomm-devel,pkgconfig(cairomm-pdf-1.0) cairomm-devel,pkgconfig(cairomm-png-1.0) cairomm-devel,pkgconfig(cairomm-ps-1.0) cairomm-devel,pkgconfig(cairomm-svg-1.0) cairomm-devel,pkgconfig(cairomm-xlib-1.0) check-devel,pkgconfig(check) cheese-devel,pkgconfig(cheese-gtk) clean-device-devel,pkgconfig(clean-device) clutter-box2d-devel,pkgconfig(clutter-box2d-0.10) clutter-devel,pkgconfig(cally-1.0) clutter-devel,pkgconfig(clutter-1.0) clutter-devel,pkgconfig(clutter-glx-1.0) clutter-devel,pkgconfig(clutter-x11-1.0) clutter-devel,pkgconfig(cogl-1.0) clutter-devel,pkgconfig(cogl-gl-1.0) clutter-gesture-devel,pkgconfig(clutter-gesture) clutter-gst-devel,pkgconfig(clutter-gst-1.0) clutter-gtk-devel,pkgconfig(clutter-gtk-0.12) clutter-imcontext-devel,pkgconfig(clutter-imcontext-0.1) compat-telepathy-qt4-devel,pkgconfig(TelepathyQt4) compat-telepathy-qt4-farsight-devel,pkgconfig(TelepathyQt4Farsight) connman-devel,pkgconfig(connman) contactsd-devel,pkgconfig(contactsd-1.0) contextkit-devel,pkgconfig(contextprovider-1.0) contextkit-devel,pkgconfig(contextsubscriber-1.0) cppunit-devel,pkgconfig(cppunit) cryptsetup-luks-devel,pkgconfig(libcryptsetup) ctdb-devel,pkgconfig(ctdb) dbus-devel,pkgconfig(dbus-1) dbus-glib-devel,pkgconfig(dbus-glib-1) dbus-python-devel,pkgconfig(dbus-python) devhelp-devel,pkgconfig(libdevhelp-1.0) device-mapper-devel,pkgconfig(devmapper) djvulibre-devel,pkgconfig(ddjvuapi) dotconf-devel,pkgconfig(dotconf) e2fsprogs-devel,pkgconfig(e2p) e2fsprogs-devel,pkgconfig(ext2fs) ecryptfs-utils-devel,pkgconfig(libecryptfs) eggdbus-devel,pkgconfig(eggdbus-1) enchant-devel,pkgconfig(enchant) eog-devel,pkgconfig(eog) esound-devel,pkgconfig(esound) evince-devel,pkgconfig(evince-document-2.30) evince-devel,pkgconfig(evince-view-2.30) evolution-data-server-devel,pkgconfig(camel-1.2) evolution-data-server-devel,pkgconfig(camel-provider-1.2) evolution-data-server-devel,pkgconfig(evolution-data-server-1.2) evolution-data-server-devel,pkgconfig(libebackend-1.2) evolution-data-server-devel,pkgconfig(libebook-1.2) evolution-data-server-devel,pkgconfig(libecal-1.2) evolution-data-server-devel,pkgconfig(libedata-book-1.2) evolution-data-server-devel,pkgconfig(libedata-cal-1.2) evolution-data-server-devel,pkgconfig(libedataserver-1.2) evolution-data-server-devel,pkgconfig(libedataserverui-1.2) evolution-data-server-devel,pkgconfig(libegroupwise-1.2) evolution-devel,pkgconfig(evolution-calendar) evolution-devel,pkgconfig(evolution-mail) evolution-devel,pkgconfig(evolution-plugin) evolution-devel,pkgconfig(evolution-shell) exempi-devel,pkgconfig(exempi-2.0) exiv2-devel,pkgconfig(exiv2) farsight2-devel,pkgconfig(farsight2-0.10) fennec-qt-devel,pkgconfig(libxul) fennec-qt-devel,pkgconfig(libxul-embedding) fennec-qt-devel,pkgconfig(mozilla-gtkmozembed) fennec-qt-devel,pkgconfig(mozilla-gtkmozembed-embedding) fennec-qt-devel,pkgconfig(mozilla-js) fennec-qt-devel,pkgconfig(mozilla-plugin) finch-devel,pkgconfig(finch) finch-devel,pkgconfig(gnt) flac-devel,pkgconfig(flac) flac-devel,pkgconfig(flac++) fontconfig-devel,pkgconfig(fontconfig) fontforge-devel,pkgconfig(fontforge) freetype-devel,pkgconfig(freetype2) fribidi-devel,pkgconfig(fribidi) fuse-devel,pkgconfig(fuse) gamin-devel,pkgconfig(gamin) gammu-devel,pkgconfig(gammu) gammu-devel,pkgconfig(gammu-smsd) garage-client-services-devel,pkgconfig(garage-client-services) gc-devel,pkgconfig(bdw-gc) gconf-sharp2,pkgconfig(gconf-sharp-2.0) gconf-sharp2,pkgconfig(gconf-sharp-peditors-2.0) gd-devel,pkgconfig(gdlib) gedit-devel,pkgconfig(gedit-2.20) gegl-devel,pkgconfig(gegl) geoclue-devel,pkgconfig(geoclue) gimp-devel,pkgconfig(gimp-2.0) gimp-devel,pkgconfig(gimpthumb-2.0) gimp-devel,pkgconfig(gimpui-2.0) glade-sharp2,pkgconfig(glade-sharp-2.0) glade3-libgladeui-devel,pkgconfig(gladeui-1.0) glew-devel,pkgconfig(glew) glib-sharp2,pkgconfig(glib-sharp-2.0) glib2-devel,pkgconfig(gio-2.0) glib2-devel,pkgconfig(gio-unix-2.0) glib2-devel,pkgconfig(glib-2.0) glib2-devel,pkgconfig(gmodule-2.0) glib2-devel,pkgconfig(gmodule-export-2.0) glib2-devel,pkgconfig(gmodule-no-export-2.0) glib2-devel,pkgconfig(gobject-2.0) glib2-devel,pkgconfig(gthread-2.0) glibmm-devel,pkgconfig(giomm-2.4) glibmm-devel,pkgconfig(glibmm-2.4) gmime-devel,pkgconfig(gmime-2.4) gnet2-devel,pkgconfig(gnet-2.0) gnome-bluetooth-libs-devel,pkgconfig(gnome-bluetooth-1.0) gnome-control-center-netbook-devel,pkgconfig(gnome-keybindings) gnome-control-center-netbook-devel,pkgconfig(gnome-window-settings-2.0) gnome-control-center-netbook-devel,pkgconfig(libgnome-control-center-extension) gnome-desktop-devel,pkgconfig(gnome-desktop-2.0) gnome-disk-utility-devel,pkgconfig(gdu) gnome-disk-utility-ui-devel,pkgconfig(gdu-gtk) gnome-doc-utils-stylesheets,pkgconfig(gnome-doc-utils) gnome-doc-utils-stylesheets,pkgconfig(xml2po) gnome-icon-theme,pkgconfig(gnome-icon-theme) gnome-keyring-devel,pkgconfig(gcr-0) gnome-keyring-devel,pkgconfig(gp11-0) gnome-media-devel,pkgconfig(gnome-media-profiles) gnome-menus-devel,pkgconfig(libgnome-menu) gnome-mime-data,pkgconfig(gnome-mime-data-2.0) gnome-panel-devel,pkgconfig(libpanelapplet-2.0) gnome-python2-desktop,pkgconfig(gnome-python-desktop-2.0) gnome-python2-devel,pkgconfig(gnome-python-2.0) gnome-screensaver,pkgconfig(gnome-screensaver) gnome-settings-daemon-devel,pkgconfig(gnome-settings-daemon) gnome-sharp2,pkgconfig(gnome-sharp-2.0) gnome-utils-devel,pkgconfig(gdict-1.0) gnome-vfs-sharp2,pkgconfig(gnome-vfs-sharp-2.0) gnome-vfs2-devel,pkgconfig(gnome-vfs-2.0) gnome-vfs2-devel,pkgconfig(gnome-vfs-module-2.0) gnumeric-devel,pkgconfig(libspreadsheet-1.10) gnutls-devel,pkgconfig(gnutls) goffice-devel,pkgconfig(libgoffice-0.8) google-gadgets-devel,pkgconfig(libggadget-1.0) google-gadgets-devel,pkgconfig(libggadget-dbus-1.0) google-gadgets-devel,pkgconfig(libggadget-gtk-1.0) google-gadgets-devel,pkgconfig(libggadget-js-1.0) google-gadgets-devel,pkgconfig(libggadget-npapi-1.0) google-gadgets-devel,pkgconfig(libggadget-xdg-1.0) gpsd-devel,pkgconfig(libgps) gpsd-devel,pkgconfig(libgpsd) graphviz-devel,pkgconfig(libcdt) graphviz-devel,pkgconfig(libcgraph) graphviz-devel,pkgconfig(libgraph) graphviz-devel,pkgconfig(libgvc) graphviz-devel,pkgconfig(libgvpr) graphviz-devel,pkgconfig(libpathplan) graphviz-devel,pkgconfig(libxdot) grilo-devel,pkgconfig(grilo-0.1) grilo-devel,pkgconfig(grilo-net-0.1) gsl-devel,pkgconfig(gsl) gssdp-devel,pkgconfig(gssdp-1.0) gst-plugins-bad-free-devel,pkgconfig(gstreamer-plugins-bad-free-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-app-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-audio-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-cdda-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-fft-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-floatcast-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-interfaces-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-netbuffer-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-pbutils-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-plugins-base-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-riff-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-rtp-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-rtsp-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-sdp-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-tag-0.10) gst-plugins-base-devel,pkgconfig(gstreamer-video-0.10) gst-plugins-camera-devel,pkgconfig(gstreamer-nokia-videosrc-0.10) gst-v4l2-camsrc-devel,pkgconfig(gstreamer-atomisphal-0.10) gst-v4l2-camsrc-devel,pkgconfig(gstreamer-mfld-videosrc-0.10) gst-vabuffer-devel,pkgconfig(gst-vabuffer) gstreamer-devel,pkgconfig(gstreamer-0.10) gstreamer-devel,pkgconfig(gstreamer-base-0.10) gstreamer-devel,pkgconfig(gstreamer-check-0.10) gstreamer-devel,pkgconfig(gstreamer-controller-0.10) gstreamer-devel,pkgconfig(gstreamer-dataprotocol-0.10) gstreamer-devel,pkgconfig(gstreamer-net-0.10) gstreamer-editing-services-devel,pkgconfig(gst-editing-services-0.10) gstreamer-python-devel,pkgconfig(gst-python-0.10) gtk-doc,pkgconfig(gtk-doc) gtk-sharp2,pkgconfig(gtk-dotnet-2.0) gtk-sharp2,pkgconfig(gtk-sharp-2.0) gtk-sharp2-gapi,pkgconfig(gapi-2.0) gtk2-devel,pkgconfig(gail) gtk2-devel,pkgconfig(gdk-2.0) gtk2-devel,pkgconfig(gdk-pixbuf-2.0) gtk2-devel,pkgconfig(gdk-pixbuf-xlib-2.0) gtk2-devel,pkgconfig(gdk-x11-2.0) gtk2-devel,pkgconfig(gtk+-2.0) gtk2-devel,pkgconfig(gtk+-unix-print-2.0) gtk2-devel,pkgconfig(gtk+-x11-2.0) gtk2-engines-devel,pkgconfig(gtk-engines-2) gtkglext-devel,pkgconfig(gdkglext-1.0) gtkglext-devel,pkgconfig(gdkglext-x11-1.0) gtkglext-devel,pkgconfig(gtkglext-1.0) gtkglext-devel,pkgconfig(gtkglext-x11-1.0) gtkhtml3-devel,pkgconfig(gtkhtml-editor) gtkhtml3-devel,pkgconfig(libgtkhtml-3.14) gtkmathview-devel,pkgconfig(gtkmathview-custom-reader) gtkmathview-devel,pkgconfig(gtkmathview-libxml2) gtkmathview-devel,pkgconfig(gtkmathview-libxml2-reader) gtkmathview-devel,pkgconfig(mathview-backend-gtk) gtkmathview-devel,pkgconfig(mathview-backend-ps) gtkmathview-devel,pkgconfig(mathview-backend-svg) gtkmathview-devel,pkgconfig(mathview-core) gtkmathview-devel,pkgconfig(mathview-frontend-custom-reader) gtkmathview-devel,pkgconfig(mathview-frontend-libxml2) gtkmathview-devel,pkgconfig(mathview-frontend-libxml2-reader) gtkmm-devel,pkgconfig(atkmm-1.6) gtkmm-devel,pkgconfig(gdkmm-2.4) gtkmm-devel,pkgconfig(gtkmm-2.4) gtksourceview2-devel,pkgconfig(gtksourceview-2.0) gtkspell-devel,pkgconfig(gtkspell-2.0) guile-devel,pkgconfig(guile-1.8) gupnp-av-devel,pkgconfig(gupnp-av-1.0) gupnp-devel,pkgconfig(gupnp-1.0) gupnp-dlna-devel,pkgconfig(gupnp-dlna-1.0) gupnp-igd-devel,pkgconfig(gupnp-igd-1.0) gupnp-ui-devel,pkgconfig(gupnp-ui-1.0) gupnp-vala,pkgconfig(gupnp-vala-1.0) gwenhywfar-devel,pkgconfig(gwenhywfar) gypsy-devel,pkgconfig(gypsy) hunspell-devel,pkgconfig(hunspell) icon-naming-utils,pkgconfig(icon-naming-utils) ilmbase-devel,pkgconfig(IlmBase) iptables-devel,pkgconfig(libiptc) iptables-devel,pkgconfig(xtables) iso-codes-devel,pkgconfig(iso-codes) jana-devel,pkgconfig(libjana) jana-devel,pkgconfig(libjana-ecal) jana-devel,pkgconfig(libjana-gtk) json-c-devel,pkgconfig(json) json-glib-devel,pkgconfig(json-glib-1.0) kcalcore-devel,pkgconfig(libkcalcoren) lcms-devel,pkgconfig(lcms) libCI-devel,pkgconfig(libci) libICE-devel,pkgconfig(ice) libIDL-devel,pkgconfig(libIDL-2.0) libSM-devel,pkgconfig(sm) libX11-devel,pkgconfig(x11) libX11-devel,pkgconfig(x11-xcb) libXScrnSaver-devel,pkgconfig(xscrnsaver) libXTrap-devel,pkgconfig(xtrap) libXau-devel,pkgconfig(xau) libXaw-compat,pkgconfig(xaw6) libXaw-devel,pkgconfig(xaw7) libXcomposite-devel,pkgconfig(xcomposite) libXcursor-devel,pkgconfig(xcursor) libXdamage-devel,pkgconfig(xdamage) libXdmcp-devel,pkgconfig(xdmcp) libXevie-devel,pkgconfig(xevie) libXext-devel,pkgconfig(xext) libXfixes-devel,pkgconfig(xfixes) libXfont-devel,pkgconfig(xfont) libXfontcache-devel,pkgconfig(xfontcache) libXft-devel,pkgconfig(xft) libXi-devel,pkgconfig(xi) libXinerama-devel,pkgconfig(xinerama) libXmu-devel,pkgconfig(xmu) libXmu-devel,pkgconfig(xmuu) libXpm-devel,pkgconfig(xpm) libXrandr-devel,pkgconfig(xrandr) libXrender-devel,pkgconfig(xrender) libXres-devel,pkgconfig(xres) libXt-devel,pkgconfig(xt) libXtst-devel,pkgconfig(xtst) libXv-devel,pkgconfig(xv) libXvMC-devel,pkgconfig(xvmc) libXxf86dga-devel,pkgconfig(xxf86dga) libXxf86misc-devel,pkgconfig(xxf86misc) libXxf86vm-devel,pkgconfig(xxf86vm) libabiword-devel,pkgconfig(abiword-2.8) libaccounts-glib-devel,pkgconfig(libaccounts-glib) libaccounts-qt-devel,pkgconfig(accounts-qt) libaccounts-ui-devel,pkgconfig(AccountPlugin) libao-devel,pkgconfig(ao) libarchive-devel,pkgconfig(libarchive) libart_lgpl-devel,pkgconfig(libart-2.0) libasyncns-devel,pkgconfig(libasyncns) libatasmart-devel,pkgconfig(libatasmart) libblkid-devel,pkgconfig(blkid) libbonobo-devel,pkgconfig(bonobo-activation-2.0) libbonobo-devel,pkgconfig(libbonobo-2.0) libbonoboui-devel,pkgconfig(libbonoboui-2.0) libburn-devel,pkgconfig(libburn-1) libcanberra-devel,pkgconfig(libcanberra) libcanberra-devel,pkgconfig(libcanberra-gtk) libcap-ng-devel,pkgconfig(libcap-ng) libchamplain-devel,pkgconfig(champlain-0.8) libchamplain-devel,pkgconfig(champlain-gtk-0.8) libchamplain-gtk-devel,pkgconfig(champlain-gtk-0.8) libchewing-devel,pkgconfig(chewing) libcmtspeech-ifx-devel,pkgconfig(libcmtspeech-ifx) libcom_err-devel,pkgconfig(com_err) libcommhistory-devel,pkgconfig(commhistory) libcontentaction-devel,pkgconfig(contentaction-0.1) libcqpid-devel,pkgconfig(libcqpid) libcroco-devel,pkgconfig(libcroco-0.6) libcurl-devel,pkgconfig(libcurl) libdaemon-devel,pkgconfig(libdaemon) libdbus-c++-devel,pkgconfig(dbus-c++-1) libdbus-qeventloop-devel,pkgconfig(libdbus-qeventloop1) libdiscid-devel,pkgconfig(libdiscid) libdmx-devel,pkgconfig(dmx) libdres-devel,pkgconfig(libdres) libdrm-devel,pkgconfig(libdrm) libdrm-devel,pkgconfig(libdrm_intel) libdrm-devel,pkgconfig(libdrm_radeon) libdrm-devel,pkgconfig(libkms) libdsme-devel,pkgconfig(dsme) libdsme-devel,pkgconfig(dsme_dbus_if) libdsme-devel,pkgconfig(thermalmanager_dbus_if) libeap0-devel,pkgconfig(libeap0) libedit-devel,pkgconfig(libedit) libeigen2-devel,pkgconfig(eigen2) libenca-devel,pkgconfig(enca) libexif-devel,pkgconfig(libexif) libfakekey-devel,pkgconfig(libfakekey) libffi-devel,pkgconfig(libffi) libfontenc-devel,pkgconfig(fontenc) libfprint-devel,pkgconfig(libfprint) libgail-gnome-devel,pkgconfig(libgail-gnome) libgcrypt-devel,pkgconfig(libgcrypt) libgcrypt-devel,pkgconfig(libgpg-error) libgda-devel,pkgconfig(libgda-4.0) libgda-devel,pkgconfig(libgda-bdb-4.0) libgda-devel,pkgconfig(libgda-report-4.0) libgda-devel,pkgconfig(libgda-xslt-4.0) libgda-sqlite-devel,pkgconfig(libgda-sqlite-4.0) libgdata-devel,pkgconfig(libgdata) libgdbus-devel,pkgconfig(gdbus) libgdiplus0-devel,pkgconfig(libgdiplus) libgdl-devel,pkgconfig(gdl-1.0) libgee-devel,pkgconfig(gee-1.0) libggz-devel,pkgconfig(libggz) libglade2-devel,pkgconfig(libglade-2.0) libglademm-devel,pkgconfig(libglademm-2.4) libgnome-devel,pkgconfig(libgnome-2.0) libgnome-keyring-devel,pkgconfig(gnome-keyring-1) libgnomecanvas-devel,pkgconfig(libgnomecanvas-2.0) libgnomecups-devel,pkgconfig(libgnomecups-1.0) libgnomekbd-devel,pkgconfig(libgnomekbd) libgnomekbd-devel,pkgconfig(libgnomekbdui) libgnomeprint22-devel,pkgconfig(libgnomeprint-2.2) libgnomeprintui22-devel,pkgconfig(libgnomeprintui-2.2) libgnomeui-devel,pkgconfig(libgnomeui-2.0) libgphoto2-devel,pkgconfig(libgphoto2) libgphoto2-devel,pkgconfig(libgphoto2_port) libgsf-devel,pkgconfig(libgsf-1) libgtop2-devel,pkgconfig(libgtop-2.0) libgudev1-devel,pkgconfig(gudev-1.0) libgweather-devel,pkgconfig(gweather) libhangul-devel,pkgconfig(libhangul) libical-devel,pkgconfig(libical) libicu-devel,pkgconfig(icu-i18n) libicu-devel,pkgconfig(icu-io) libicu-devel,pkgconfig(icu-le) libicu-devel,pkgconfig(icu-lx) libicu-devel,pkgconfig(icu-uc) libid3tag-devel,pkgconfig(id3tag) libidn-devel,pkgconfig(libidn) libiphb-devel,pkgconfig(libiphb) libiptcdata-devel,pkgconfig(libiptcdata) libisofs-devel,pkgconfig(libisofs-1) libjingle-devel,pkgconfig(jinglebase-0.3) libjingle-devel,pkgconfig(jinglep2p-0.3) libmatchbox-devel,pkgconfig(libmb) libmdatauri-devel,pkgconfig(mdatauri) libmeegochat-devel,pkgconfig(libmeegochat) libmeegocontrolpanel-devel,pkgconfig(duicontrolpanel) libmeegocontrolpanel-devel,pkgconfig(meegotouch-controlpanel) libmeegotouch-devel,pkgconfig(meegotouch) libmeegotouch-devel,pkgconfig(meegotouch-boostable) libmeegotouch-devel,pkgconfig(meegotouchcore) libmeegotouch-devel,pkgconfig(meegotouchsettings) libmtp-devel,pkgconfig(libmtp) libngf-devel,pkgconfig(libngf0) libnice-devel,pkgconfig(nice) libnl-devel,pkgconfig(libnl-1) libnotify-devel,pkgconfig(libnotify) libofono-qt-devel,pkgconfig(ofono-qt) libofx-devel,pkgconfig(libofx) libogg-devel,pkgconfig(ogg) liboil-devel,pkgconfig(liboil-0.3) libopenraw-devel,pkgconfig(libopenraw-1.0) libopenraw-gnome-devel,pkgconfig(libopenraw-gnome-1.0) libopensync-devel,pkgconfig(opensync-1.0) libpciaccess-devel,pkgconfig(pciaccess) libphonon-devel,pkgconfig(phonon) libpng-devel,pkgconfig(libpng) libpng-devel,pkgconfig(libpng12) libprolog-devel,pkgconfig(libprolog) libpthread-stubs,pkgconfig(pthread-stubs) libpublishwidgets-devel,pkgconfig(publish-widgets) libpurple-devel,pkgconfig(purple) libqt-devel,pkgconfig(QtCLucene) libqt-devel,pkgconfig(QtCore) libqt-devel,pkgconfig(QtDBus) libqt-devel,pkgconfig(QtDeclarative) libqt-devel,pkgconfig(QtDesigner) libqt-devel,pkgconfig(QtDesignerComponents) libqt-devel,pkgconfig(QtGui) libqt-devel,pkgconfig(QtHelp) libqt-devel,pkgconfig(QtNetwork) libqt-devel,pkgconfig(QtScript) libqt-devel,pkgconfig(QtScriptTools) libqt-devel,pkgconfig(QtSql) libqt-devel,pkgconfig(QtSvg) libqt-devel,pkgconfig(QtTest) libqt-devel,pkgconfig(QtUiTools) libqt-devel,pkgconfig(QtXml) libqt-devel,pkgconfig(QtXmlPatterns) libqtopengl-devel,pkgconfig(QtMeeGoGraphicsSystemHelper) libqtopengl-devel,pkgconfig(QtOpenGL) libqtsparql-devel,pkgconfig(QtSparql) libqtsparql-tracker-extensions-devel,pkgconfig(QtSparqlTrackerExtensions) libqttracker-devel,pkgconfig(qttracker) libqtwebkit-devel,pkgconfig(QtWebKit) libquill-devel,pkgconfig(quill) libquillmetadata-devel,pkgconfig(quillmetadata) librapi2-devel,pkgconfig(librapi2) libresource-devel,pkgconfig(libresource0) libresource-devel,pkgconfig(libresource0-glib) libresourceqt-devel,pkgconfig(libresourceqt1) librsvg2-devel,pkgconfig(librsvg-2.0) libsamplerate-devel,pkgconfig(samplerate) libsexy-devel,pkgconfig(libsexy) libshare-ui-devel,pkgconfig(share-ui-plugin) libshare-ui-devel,pkgconfig(share-widgets) libsigc++-devel,pkgconfig(sigc++-2.0) libsignon-devel,pkgconfig(SignOnExtension) libsignon-devel,pkgconfig(libsignon-qt) libsignon-devel,pkgconfig(signon-plugins) libsignon-devel,pkgconfig(signon-plugins-common) libsignon-devel,pkgconfig(signon-saslplugin) libsignon-devel,pkgconfig(signond) libsignon-glib-devel,pkgconfig(libsignon-glib) libsignoncrypto-qt-devel,pkgconfig(libsignoncrypto-qt) libsilc-devel,pkgconfig(silc) libsilc-devel,pkgconfig(silcclient) libsmbclient-devel,pkgconfig(smbclient) libsmbclient-devel,pkgconfig(smbsharemodes) libsmbios-devel,pkgconfig(libsmbios_c) libsndfile-devel,pkgconfig(sndfile) libsocialweb-devel,pkgconfig(libsocialweb-client) libsocialweb-devel,pkgconfig(libsocialweb-keyfob) libsocialweb-devel,pkgconfig(libsocialweb-keystore) libsocialweb-devel,pkgconfig(libsocialweb-module) libsocialweb-qt-devel,pkgconfig(libsocialweb-qt) libsoup-devel,pkgconfig(libsoup-2.4) libsoup-devel,pkgconfig(libsoup-gnome-2.4) libspectre-devel,pkgconfig(libspectre) libss-devel,pkgconfig(ss) libsynce-devel,pkgconfig(libsynce) libsyncml-devel,pkgconfig(libsyncml-1.0) libtalloc-devel,pkgconfig(talloc) libtasn1-devel,pkgconfig(libtasn1) libtdb-compat-devel,pkgconfig(tdb-compat) libtdb-devel,pkgconfig(tdb) libtelepathy-devel,pkgconfig(libtelepathy) libthai-devel,pkgconfig(libthai) libtheora-devel,pkgconfig(theora) libtheora-devel,pkgconfig(theoradec) libtheora-devel,pkgconfig(theoraenc) libtrace-devel,pkgconfig(libsimple-trace) libudev-devel,pkgconfig(libudev) libudev-devel,pkgconfig(udev) libusb-devel,pkgconfig(libusb) libusb1-devel,pkgconfig(libusb-1.0) libuser-devel,pkgconfig(libuser) libuuid-devel,pkgconfig(uuid) libv4l-devel,pkgconfig(libv4l1) libv4l-devel,pkgconfig(libv4l2) libv4l-devel,pkgconfig(libv4lconvert) libva-devel,pkgconfig(libva) libva-devel,pkgconfig(libva-egl) libva-devel,pkgconfig(libva-glx) libva-devel,pkgconfig(libva-tpi) libva-devel,pkgconfig(libva-x11) libvisual-devel,pkgconfig(libvisual-0.4) libvorbis-devel,pkgconfig(vorbis) libvorbis-devel,pkgconfig(vorbisenc) libvorbis-devel,pkgconfig(vorbisfile) libwbxml2-devel,pkgconfig(libwbxml2) libwebupload-devel,pkgconfig(libwebupload) libwmf-devel,pkgconfig(libwmf) libwnck-devel,pkgconfig(libwnck-1.0) libwpd-devel,pkgconfig(libwpd-0.8) libwpd-devel,pkgconfig(libwpd-stream-0.8) libwpg-devel,pkgconfig(libwpg-0.1) libwpg-devel,pkgconfig(libwpg-stream-0.1) libwps-devel,pkgconfig(libwps-0.1) libwps-devel,pkgconfig(libwps-stream-0.1) libwsbm-devel,pkgconfig(libwsbm) libxcb-devel,pkgconfig(xcb) libxcb-devel,pkgconfig(xcb-composite) libxcb-devel,pkgconfig(xcb-damage) libxcb-devel,pkgconfig(xcb-dpms) libxcb-devel,pkgconfig(xcb-dri2) libxcb-devel,pkgconfig(xcb-glx) libxcb-devel,pkgconfig(xcb-randr) libxcb-devel,pkgconfig(xcb-record) libxcb-devel,pkgconfig(xcb-render) libxcb-devel,pkgconfig(xcb-res) libxcb-devel,pkgconfig(xcb-screensaver) libxcb-devel,pkgconfig(xcb-shape) libxcb-devel,pkgconfig(xcb-shm) libxcb-devel,pkgconfig(xcb-sync) libxcb-devel,pkgconfig(xcb-xevie) libxcb-devel,pkgconfig(xcb-xf86dri) libxcb-devel,pkgconfig(xcb-xfixes) libxcb-devel,pkgconfig(xcb-xinerama) libxcb-devel,pkgconfig(xcb-xprint) libxcb-devel,pkgconfig(xcb-xtest) libxcb-devel,pkgconfig(xcb-xv) libxcb-devel,pkgconfig(xcb-xvmc) libxkbfile-devel,pkgconfig(xkbfile) libxklavier-devel,pkgconfig(libxklavier) libxml2-devel,pkgconfig(libxml-2.0) libxslt-devel,pkgconfig(libexslt) libxslt-devel,pkgconfig(libxslt) libzip-devel,pkgconfig(libzip) libzypp-devel,pkgconfig(libzypp) link-grammar-devel,pkgconfig(link-grammar) loudmouth-devel,pkgconfig(loudmouth-1.0) lua-devel,pkgconfig(lua) m17n-db-devel,pkgconfig(m17n-db) m17n-lib-devel,pkgconfig(m17n-core) m17n-lib-devel,pkgconfig(m17n-flt) m17n-lib-devel,pkgconfig(m17n-shell) marmazon-devel,pkgconfig(marmazon) matchbox-panel-devel,pkgconfig(matchbox-panel) mce-headers,pkgconfig(mce) meego-panel-myzone-devel,pkgconfig(penge) meego-panel-status-devel,pkgconfig(meego-panel-status) meegotouch-applauncherd-devel,pkgconfig(meegotouch-boostable) meegotouch-applauncherd-devel,pkgconfig(qdeclarative-boostable) meegotouch-applauncherd-devel,pkgconfig(qt-boostable) meegotouch-feedback-devel,pkgconfig(meegotouch-feedback) meegotouch-feedbackreactionmaps-devel,pkgconfig(meegotouch-feedbackreactionmaps) meegotouch-inputmethodengine-devel,pkgconfig(MeegoImEngine) meegotouch-inputmethodframework-devel,pkgconfig(MeegoImFramework) meegotouchcp-bluetooth-libmeegobluetooth-devel,pkgconfig(meegobluetooth) meegotouchcp-connman-libconnman-qt-devel,pkgconfig(connman-qt) mesa-dri-drivers-devel,pkgconfig(dri) mesa-libEGL-devel,pkgconfig(egl) mesa-libGL-devel,pkgconfig(gl) mesa-libGLESv1-devel,pkgconfig(glesv1_cm) mesa-libGLESv2-devel,pkgconfig(glesv2) mesa-libGLU-devel,pkgconfig(glu) mesa-libOSMesa-devel,pkgconfig(osmesa) mesa-libOpenVG-devel,pkgconfig(vg) min,pkgconfig(min) min-devel,pkgconfig(min-dev) minizip-devel,pkgconfig(minizip) mkcal-devel,pkgconfig(libmkcal) mm-common,pkgconfig(mm-common-libstdc++) mobile-broadband-provider-info,pkgconfig(mobile-broadband-provider-info) mono-addins,pkgconfig(mono-addins) mono-addins,pkgconfig(mono-addins-gui) mono-addins,pkgconfig(mono-addins-setup) mono-devel,pkgconfig(cecil) mono-devel,pkgconfig(dotnet) mono-devel,pkgconfig(dotnet35) mono-devel,pkgconfig(mono) mono-devel,pkgconfig(mono-cairo) mono-devel,pkgconfig(mono-lineeditor) mono-devel,pkgconfig(mono-options) mono-nunit,pkgconfig(mono-nunit) mono-wcf,pkgconfig(wcf) mono-web,pkgconfig(mono.web) mono-web,pkgconfig(system.web.extensions.design_1.0) mono-web,pkgconfig(system.web.extensions_1.0) mono-web,pkgconfig(system.web.mvc) mono-zeroconf-devel,pkgconfig(mono-zeroconf) monodoc-core,pkgconfig(monodoc) mssf-certman-devel,pkgconfig(mssf-certman) mssf-crypto-devel,pkgconfig(mssf-crypto) mtdev-devel,pkgconfig(mtdev) mutter-devel,pkgconfig(libmutter-private) mutter-devel,pkgconfig(mutter-plugins) mutter-netbook-devel,pkgconfig(meego-panel) mx-devel,pkgconfig(mx-1.0) mx-devel,pkgconfig(mx-gtk-1.0) nautilus-devel,pkgconfig(libnautilus-extension) nautilus-python-devel,pkgconfig(nautilus-python) ncurses-devel,pkgconfig(form) ncurses-devel,pkgconfig(formw) ncurses-devel,pkgconfig(menu) ncurses-devel,pkgconfig(menuw) ncurses-devel,pkgconfig(ncurses) ncurses-devel,pkgconfig(ncursesw) ncurses-devel,pkgconfig(panel) ncurses-devel,pkgconfig(panelw) ncurses-devel,pkgconfig(tic) ncurses-devel,pkgconfig(tinfo) ndesk-dbus,pkgconfig(ndesk-dbus-1.0) ndesk-dbus-glib-devel,pkgconfig(ndesk-dbus-glib-1.0) neon-devel,pkgconfig(neon) newt-devel,pkgconfig(libnewt) ngfd-plugin-dev,pkgconfig(ngf-plugin) notify-python,pkgconfig(notify-python) notify-sharp,pkgconfig(notify-sharp) nspr-devel,pkgconfig(nspr) nss-devel,pkgconfig(nss) ofono-devel,pkgconfig(ofono) ohm-devel,pkgconfig(libohmfact) ohm-devel,pkgconfig(libohmplugin) ohm-devel,pkgconfig(ohm) opal-devel,pkgconfig(opal) openobex-devel,pkgconfig(openobex) openssl-devel,pkgconfig(libcrypto) openssl-devel,pkgconfig(libssl) openssl-devel,pkgconfig(openssl) orc-devel,pkgconfig(orc-0.4) ots-devel,pkgconfig(libots-1) pacrunner-devel,pkgconfig(libproxy-1.0) pakchois-devel,pkgconfig(pakchois) pango-devel,pkgconfig(pango) pango-devel,pkgconfig(pangocairo) pango-devel,pkgconfig(pangoft2) pango-devel,pkgconfig(pangox) pango-devel,pkgconfig(pangoxft) pangomm-devel,pkgconfig(pangomm-1.4) parted-devel,pkgconfig(libparted) pciutils-devel,pkgconfig(libpci) pcre-devel,pkgconfig(libpcre) pcre-devel,pkgconfig(libpcrecpp) pcre-devel,pkgconfig(libpcreposix) pidgin-devel,pkgconfig(pidgin) pixman-devel,pkgconfig(pixman-1) pkcs11-helper-devel,pkgconfig(libpkcs11-helper-1) pm-utils-devel,pkgconfig(pm-utils) pocketsphinx-devel,pkgconfig(pocketsphinx) polkit-devel,pkgconfig(polkit-agent-1) polkit-devel,pkgconfig(polkit-backend-1) polkit-devel,pkgconfig(polkit-gobject-1) polkit-gnome-devel,pkgconfig(polkit-gtk-1) poppler-devel,pkgconfig(poppler) poppler-devel,pkgconfig(poppler-splash) poppler-glib-devel,pkgconfig(poppler-cairo) poppler-glib-devel,pkgconfig(poppler-glib) poppler-qt-devel,pkgconfig(poppler-qt4) popt-devel,pkgconfig(popt) ptlib-devel,pkgconfig(ptlib) pulseaudio-devel,pkgconfig(libpulse) pulseaudio-devel,pkgconfig(libpulse-mainloop-glib) pulseaudio-devel,pkgconfig(libpulse-simple) pulseaudio-devel,pkgconfig(pulsecore) pycairo-devel,pkgconfig(pycairo) pyclutter-devel,pkgconfig(pyclutter-1.0) pyclutter-gtk-devel,pkgconfig(pyclutter-gtk-0.10) pygobject2-devel,pkgconfig(pygobject-2.0) pygtk2-devel,pkgconfig(pygtk-2.0) pygtkglext-devel,pkgconfig(pygtkglext-1.0) pygtksourceview-devel,pkgconfig(pygtksourceview-2.0) pyorbit-devel,pkgconfig(pyorbit-2) qca2-devel,pkgconfig(qca2) qjson-devel,pkgconfig(QJson) qmf-devel,pkgconfig(qmfclient) qmf-devel,pkgconfig(qmfmessageserver) qmsystem-devel,pkgconfig(qmsystem2) qpid-cpp-client-devel,pkgconfig(qpid) qt-mobility-devel,pkgconfig(QtConnectivity) qt-mobility-devel,pkgconfig(QtContacts) qt-mobility-devel,pkgconfig(QtFeedback) qt-mobility-devel,pkgconfig(QtGallery) qt-mobility-devel,pkgconfig(QtLocation) qt-mobility-devel,pkgconfig(QtMessaging) qt-mobility-devel,pkgconfig(QtMultimediaKit) qt-mobility-devel,pkgconfig(QtOrganizer) qt-mobility-devel,pkgconfig(QtPublishSubscribe) qt-mobility-devel,pkgconfig(QtSensors) qt-mobility-devel,pkgconfig(QtServiceFramework) qt-mobility-devel,pkgconfig(QtSystemInfo) qt-mobility-devel,pkgconfig(QtVersit) qt-mobility-devel,pkgconfig(QtVersitOrganizer) qt-obex-ftp-library-devel,pkgconfig(obexftp) qtgstreamer-devel,pkgconfig(QtGLib-2.0) qtgstreamer-devel,pkgconfig(QtGStreamer-0.10) qtgstreamer-devel,pkgconfig(QtGStreamerUi-0.10) qtgstreamer-devel,pkgconfig(QtGStreamerUtils-0.10) quillimagefilter-devel,pkgconfig(quillimagefilter) rarian-devel,pkgconfig(rarian) rest-devel,pkgconfig(rest-0.7) rest-devel,pkgconfig(rest-extras-0.7) rhythmbox-devel,pkgconfig(rhythmbox) rpm-devel,pkgconfig(rpm) rygel-devel,pkgconfig(rygel-1.0) samba-common,pkgconfig(netapi) samba-winbind-devel,pkgconfig(wbclient) sane-backends-devel,pkgconfig(sane-backends) scim-devel,pkgconfig(scim) scim-devel,pkgconfig(scim-gtkutils) scim-devel,pkgconfig(scim-x11utils) sensorfw-devel,pkgconfig(sensord) shared-mime-info,pkgconfig(shared-mime-info) signon-digest-devel,pkgconfig(signon-digestplugin) signon-oauth2-devel,pkgconfig(signon-oauth2plugin) slang-devel,pkgconfig(slang) sofia-sip-devel,pkgconfig(sofia-sip-ua) sofia-sip-glib-devel,pkgconfig(sofia-sip-ua-glib) soundtouch-devel,pkgconfig(libSoundTouch) soundtouch-devel,pkgconfig(soundtouch-1.0) soundtouch-devel,pkgconfig(soundtouch-1.4) speex-devel,pkgconfig(speex) speex-devel,pkgconfig(speexdsp) sphinxbase-devel,pkgconfig(sphinxbase) sqlite-devel,pkgconfig(sqlite3) startup-notification-devel,pkgconfig(libstartup-notification-1.0) swi-prolog-devel,pkgconfig(swi-prolog) syncevolution-devel,pkgconfig(syncevolution) syncevolution-devel,pkgconfig(synthesis) syncevolution-devel,pkgconfig(synthesis-sdk) syncevolution-gtk-devel,pkgconfig(syncevo-dbus) taglib-devel,pkgconfig(taglib) taglib-devel,pkgconfig(taglib_c) taglib-sharp-devel,pkgconfig(taglib-sharp) telepathy-farsight-devel,pkgconfig(telepathy-farsight) telepathy-glib-devel,pkgconfig(telepathy-glib) telepathy-logger-devel,pkgconfig(telepathy-logger-0.1) telepathy-mission-control-devel,pkgconfig(libmcclient) telepathy-mission-control-devel,pkgconfig(mission-control) telepathy-mission-control-devel,pkgconfig(mission-control-plugins) telepathy-qt4-devel,pkgconfig(TelepathyQt4) telepathy-qt4-farsight-devel,pkgconfig(TelepathyQt4Farsight) timed-devel,pkgconfig(timed) timed-devel,pkgconfig(timed-voland) totem-pl-parser-devel,pkgconfig(totem-plparser) totem-pl-parser-devel,pkgconfig(totem-plparser-mini) tracker-devel,pkgconfig(tracker-client-0.9) tracker-devel,pkgconfig(tracker-extract-0.9) tracker-devel,pkgconfig(tracker-miner-0.9) tracker-devel,pkgconfig(tracker-sparql-0.9) transfer-ui-devel,pkgconfig(libtuiclient) tumbler-devel,pkgconfig(tumbler-1) twitter-glib-devel,pkgconfig(twitter-glib-1.0) udisks-devel,pkgconfig(udisks) unique-devel,pkgconfig(unique-1.0) upower-devel,pkgconfig(devkit-power-gobject) upower-devel,pkgconfig(upower-glib) usbutils,pkgconfig(usbutils) uuid-devel,pkgconfig(ossp-uuid) vala-devel,pkgconfig(libvala-0.12) valgrind-devel,pkgconfig(valgrind) vamp-plugin-sdk-devel,pkgconfig(vamp) vamp-plugin-sdk-devel,pkgconfig(vamp-hostsdk) vamp-plugin-sdk-devel,pkgconfig(vamp-sdk) vte-devel,pkgconfig(pyvte) vte-devel,pkgconfig(vte) wimax-tools-devel,pkgconfig(libwimaxll-0) wimax-tools-devel,pkgconfig(libwimaxll-i2400m-0) wimax-tools-devel,pkgconfig(wimaxll-cmd-0) wv-devel,pkgconfig(wv-1.0) xcb-proto,pkgconfig(xcb-proto) xcb-util-devel,pkgconfig(xcb-atom) xcb-util-devel,pkgconfig(xcb-aux) xcb-util-devel,pkgconfig(xcb-event) xcb-util-devel,pkgconfig(xcb-icccm) xcb-util-devel,pkgconfig(xcb-image) xcb-util-devel,pkgconfig(xcb-keysyms) xcb-util-devel,pkgconfig(xcb-property) xcb-util-devel,pkgconfig(xcb-renderutil) xcb-util-devel,pkgconfig(xcb-reply) xmlrpc-c-devel,pkgconfig(xmlrpc) xmlrpc-c-devel,pkgconfig(xmlrpc++) xmlrpc-c-devel,pkgconfig(xmlrpc_abyss) xmlrpc-c-devel,pkgconfig(xmlrpc_client) xmlrpc-c-devel,pkgconfig(xmlrpc_client++) xmlrpc-c-devel,pkgconfig(xmlrpc_cpp) xmlrpc-c-devel,pkgconfig(xmlrpc_packetsocket) xmlrpc-c-devel,pkgconfig(xmlrpc_server) xmlrpc-c-devel,pkgconfig(xmlrpc_server++) xmlrpc-c-devel,pkgconfig(xmlrpc_server_abyss) xmlrpc-c-devel,pkgconfig(xmlrpc_server_abyss++) xmlrpc-c-devel,pkgconfig(xmlrpc_server_cgi) xmlrpc-c-devel,pkgconfig(xmlrpc_server_cgi++) xmlrpc-c-devel,pkgconfig(xmlrpc_server_pstream++) xmlrpc-c-devel,pkgconfig(xmlrpc_util) xorg-x11-drv-evdev-devel,pkgconfig(xorg-evdev) xorg-x11-drv-joystick-devel,pkgconfig(xorg-joystick) xorg-x11-drv-synaptics-devel,pkgconfig(xorg-synaptics) xorg-x11-drv-wacom-devel,pkgconfig(xorg-wacom) xorg-x11-font-utils,pkgconfig(fontutil) xorg-x11-proto-bigreqsproto,pkgconfig(bigreqsproto) xorg-x11-proto-compositeproto,pkgconfig(compositeproto) xorg-x11-proto-damageproto,pkgconfig(damageproto) xorg-x11-proto-dmxproto,pkgconfig(dmxproto) xorg-x11-proto-dri2proto,pkgconfig(dri2proto) xorg-x11-proto-evieext,pkgconfig(evieproto) xorg-x11-proto-fixesproto,pkgconfig(fixesproto) xorg-x11-proto-fontcacheproto,pkgconfig(fontcacheproto) xorg-x11-proto-fontsproto,pkgconfig(fontsproto) xorg-x11-proto-glproto,pkgconfig(glproto) xorg-x11-proto-inputproto,pkgconfig(inputproto) xorg-x11-proto-kbproto,pkgconfig(kbproto) xorg-x11-proto-randrproto,pkgconfig(randrproto) xorg-x11-proto-recordproto,pkgconfig(recordproto) xorg-x11-proto-renderproto,pkgconfig(renderproto) xorg-x11-proto-resourceproto,pkgconfig(resourceproto) xorg-x11-proto-scrnsaverproto,pkgconfig(scrnsaverproto) xorg-x11-proto-trapproto,pkgconfig(trapproto) xorg-x11-proto-videoproto,pkgconfig(videoproto) xorg-x11-proto-xcmiscproto,pkgconfig(xcmiscproto) xorg-x11-proto-xextproto,pkgconfig(xextproto) xorg-x11-proto-xf86bigfontproto,pkgconfig(xf86bigfontproto) xorg-x11-proto-xf86dgaproto,pkgconfig(xf86dgaproto) xorg-x11-proto-xf86driproto,pkgconfig(xf86driproto) xorg-x11-proto-xf86miscproto,pkgconfig(xf86miscproto) xorg-x11-proto-xf86rushproto,pkgconfig(xf86rushproto) xorg-x11-proto-xf86vidmodeproto,pkgconfig(xf86vidmodeproto) xorg-x11-proto-xineramaproto,pkgconfig(xineramaproto) xorg-x11-proto-xproto,pkgconfig(xproto) xorg-x11-proto-xproxymanagementprotocol,pkgconfig(xproxymngproto) xorg-x11-server-devel,pkgconfig(xorg-server) xorg-x11-util-macros,pkgconfig(xorg-macros) xorg-x11-xbitmaps,pkgconfig(xbitmaps) xorg-x11-xtrans-devel,pkgconfig(xtrans) xz-devel,pkgconfig(liblzma) zlib-devel,pkgconfig(zlib) zvbi-devel,pkgconfig(zvbi-0.2) pvr-bin-devel,pkgconfig(egl) pvr-bin-devel,pkgconfig(glesv1_cm) pvr-bin-devel,pkgconfig(glesv2) pvr-bin-devel,pkgconfig(vg) spectacle-0.22/examples/000077500000000000000000000000001153164731700152265ustar00rootroot00000000000000spectacle-0.22/examples/xfce4-session.yaml000066400000000000000000000021611153164731700206040ustar00rootroot00000000000000Name: xfce4-session Summary: Xfce session manager Version: 4.6.1 Release: 1 Group: System/Desktop License: GPLv2+ URL: http://www.xfce.org/ Description: | xfce4-session is the session manager for the Xfce desktop environment. Patches: - xfce4-session-4.4.2-hide-tips.patch - xfce4-session-4.5.99.1-splash.patch - xfce4-session-logout.patch Sources: - http://www.xfce.org/archive/xfce-%{version}/src/xfce4-session-%{version}.tar.bz2 - xfce4-autostart-editor.png Requires: - libxfcegui4 >= %{version} - xorg-x11-server-utils PkgConfigBR: - libwnck-1.0 - xt - dbus-1 - libstartup-notification-1.0 - libglade-2.0 - libxfcegui4-1.0 PkgBR: - gettext - intltool - imake - xorg-x11-server-utils - GConf2-devel Configure: configure ConfigOptions: - --enable-gnome - --enable-final LocaleName: xfce4-session AutoSubPackages: - devel SubPackages: - Name: engines Group: System/Desktop Summary: Additional engines for xfce4-session Description: | Additional splash screen engines for the Xfce Session Manager. spectacle-0.22/setup.py000066400000000000000000000025571153164731700151330ustar00rootroot00000000000000#!/usr/bin/env python import os, sys from distutils.core import setup try: import setuptools # enable "setup.py develop", optional except ImportError: pass if 'install' in sys.argv and \ 'MAKEFLAGS' not in os.environ and \ 'RPM_BUILD_ROOT' not in os.environ: repl = raw_input('WARNING: Please use `make install` for installation, continue(y/N)? ') if repl != 'y': sys.exit(1) # For debian based systems, '--install-layout=deb' is needed after 2.6 if sys.version_info[:2] <= (2, 5) and '--install-layout=deb' in sys.argv: del sys.argv[sys.argv.index('--install-layout=deb')] version_path = 'VERSION' try: # first line should be the version number version = open(version_path).readline().strip() ver_file = open('spectacle/__version__.py', 'w') ver_file.write("VERSION = \"%s\"\n" % version) ver_file.close() except IOError: print 'WARNING: Cannot write version number file' pass setup(name='spectacle', version = version, description='Spectacle', author='Anas Nashif, Jian-feng Ding', author_email='anas.nashif@intel.com, jian-feng.ding@intel.com', url='http://moblin.org/', scripts=['tools/specify', 'tools/ini2spectacle', 'tools/spec2spectacle'], packages=['spectacle', 'spectacle.spec', 'spectacle.dsc'], package_data={'sepctacle': ['data/*.csv']}, ) spectacle-0.22/spectacle/000077500000000000000000000000001153164731700153535ustar00rootroot00000000000000spectacle-0.22/spectacle/__init__.py000066400000000000000000000000301153164731700174550ustar00rootroot00000000000000# modules for spectacle spectacle-0.22/spectacle/convertor.py000066400000000000000000000136501153164731700177530ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import sys # internal module import logger ORDER_ENTRIES = ['Name', 'AsWholeName', 'Summary', 'Version', 'Release', 'Epoch', 'Group', 'License', 'URL', 'Sources', 'ExtraSources', 'Patches', 'Description', '', 'Requires', 'RequiresPre', 'RequiresPreUn', 'RequiresPost', 'RequiresPostUn', 'PkgBR', 'PkgConfigBR', 'Provides', 'Obsoletes', 'Conflicts', 'Configure', 'ConfigOptions', 'Builder', 'BuildArch', 'ExclusiveArch', 'LocaleName', 'LocaleOptions', 'Files', 'Check', 'SupportOtherDistros', 'UseAsNeeded', 'NoAutoReq', 'NoAutoProv', 'NoAutoReqProv', ] class Convertor(object): """ Class for generic operations: * Translate field names between different format * Transfer non-order dict to ordered list of (key, val) pairs Derived sub-classes should update cv_table, the dictionary for translation, for specific input format. """ cv_table = {} # un-ordered ones will be append the ordered ones in random order # 'Files', 'SubPackages' will the last two def __init__(self, cv_table = {}): self.cv_table.update(cv_table) def _translate_keys(self, dict): # translate AutoReq/AutoProv to spectacle boolean keys autoreq = autoprov = None if 'AutoReq' in dict: autoreq = dict['AutoReq'] del dict['AutoReq'] if 'AutoProv' in dict: autoprov = dict['AutoProv'] del dict['AutoProv'] if 'AutoReqProv' in dict: if dict['AutoReqProv'] == '0': autoreq = autoprov = '0' del dict['AutoReqProv'] if autoreq == '0' and autoprov == '0': dict['NoAutoReqProv'] = 'yes' elif autoreq == '0': dict['NoAutoReq'] = 'yes' elif autoprov == '0': dict['NoAutoProv'] = 'yes' # else: ignore def _replace_keys(self, dict): for k,v in self.cv_table.iteritems(): if k in dict: dict[v] = dict[k] del dict[k] def _remove_duplicate(self, dict): # check duplicate default configopts dup = '--disable-static' if 'ConfigOptions' in dict and dup in dict['ConfigOptions']: dict['ConfigOptions'].remove(dup) if not dict['ConfigOptions']: del dict['ConfigOptions'] # check duplicate requires for base package if "SubPackages" in dict: if 'Epoch' in dict: autodep = "%{name} = %{epoch}:%{version}-%{release}" else: autodep = "%{name} = %{version}-%{release}" for sp in dict["SubPackages"]: if 'Requires' in sp and autodep in sp['Requires']: sp['Requires'].remove(autodep) if not sp['Requires']: del sp['Requires'] # check duplicate '%defattr' for files list if 'extra' in dict and 'Files' in dict['extra']: try: dict['extra']['Files'].remove('%defattr(-,root,root,-)') except ValueError: pass def convert(self, dict, need_break = True): self._replace_keys(dict) self._translate_keys(dict) self._remove_duplicate(dict) items = [] for entry in ORDER_ENTRIES: if not entry: # empty string means a blank line for break if need_break: items.append(('', '')) continue if entry in dict: items.append((entry, dict[entry])) del dict[entry] subpkgs = [] try: subpkgs_list = dict['SubPackages'] del dict['SubPackages'] for sub_items in subpkgs_list: subpkgs.append(self.convert(sub_items, False)) except: pass if 'extra' in dict: extra = dict['extra'] del dict['extra'] else: extra = {} for k, v in dict.iteritems(): logger.warning('un-ordered entry: %s' % k) items.append((k, v)) if extra: try: # clean up empty lines in %files files = [s.strip() for s in extra['Files'] if s.strip()] if files: extra['Files'] = files else: del extra['Files'] except KeyError: pass if extra: # check it again items.append(('extra', extra)) if subpkgs: items.append(('SubPackages', subpkgs)) return items spectacle-0.22/spectacle/dsc/000077500000000000000000000000001153164731700161245ustar00rootroot00000000000000spectacle-0.22/spectacle/dsc/Makefile000066400000000000000000000006501153164731700175650ustar00rootroot00000000000000# ex: set tabstop=4 noexpandtab: PYTHON=python CHEETAH=cheetah TEMPLATES=$(wildcard *.tmpl) TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES)) .SECONDARY: $(TEMPLATE_MODS) all: $(TEMPLATE_MODS) %.py: %.tmpl $(CHEETAH) compile --settings='useStackFrames=False' $< cp $@ __init__.py clean: rm -f $(TEMPLATE_MODS) rm -f $(addsuffix .bak,$(TEMPLATE_MODS)) rm -f *.xsd *.wsdl rm -f *.pyc *.pyo rm -f *.py rm -f *.bak spectacle-0.22/spectacle/dsc/dsc.tmpl000066400000000000000000000012311153164731700175700ustar00rootroot00000000000000# ############################################## # Do not Edit! Generated by: # spec-builder version 0.13 # ############################################### Format: 1.0 Source: ${metadata.Name} Architecture: any Version: ${metadata.Version} Homepage: ${metadata.URL} Standards-Version: 3.8.0 Maintainer: packagers@moblin.org ## BuildRequires #if $metadata.has_key("BuildRequires") #for $brtype in $metadata.BuildRequires #if $brtype == "PkgConfig" #for $br in $metadata.BuildRequires.PkgConfig Build-Depends: $br #end for #end if #if $brtype == "Pkg" #for $br in $metadata.BuildRequires.Pkg Build-Depends: $br #end for #end if #end for #end if spectacle-0.22/spectacle/dumper.py000066400000000000000000000143251153164731700172260ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import sys TAB = ' ' # 4space, instead of Tab class SpectacleDumper(object): """ Dumper medium data to output format. Supported output format: yaml, json The format of medium data of spectacle, as input for dumping: data = [ (key1, val1), # atom value ('', ''), # for blank line (key2, [val21, val22, val23]), # list of values (key3, [ # special for 'SubPackages' [ # items for subpkg (key31, val31), (key32, val32), ... ], [ ... ], ]), (key4, { # special for 'extra' 'key41': 'value41' ... }) ] """ spec_extra_keys = { # key -> ( nkey, nsubkey) # ^^ None means to use 'Files': ('files', None), 'macros': ('macros', None), 'setup': ('setup', None), 'PostMakeInstallExtras': ('install', 'post'), 'PreMakeInstallExtras': ('install', 'pre'), 'PostMakeExtras': ('build', 'post'), 'PreMakeExtras': ('build', 'pre'), } def __init__(self, format = 'yaml', opath = None): self.format = format self.opath = opath self.spec_extra = {} def _esc_value(self, val): # ESC for leading '%', for yaml syntax if val.startswith('%') or \ val.startswith('*') or \ ": " in val or \ ":\t" in val or \ val.endswith(':'): if '"' in val: quote_char = '\'' else: quote_char = '\"' return quote_char + val + quote_char else: return val def _dump_yaml(self, data, fp, indent = '', cur_pkg = 'main'): if indent: cur_indent = indent + '- ' else: cur_indent = indent first_line = True for key, value in data: if not first_line and indent: cur_indent = indent + ' ' if not key: # empty key means blank line for break fp.write("\n") continue if key == 'extra': for extra_key, extra_val in value.iteritems(): if not extra_val: continue try: nkey = self.spec_extra_keys[extra_key][0] nsubkey = self.spec_extra_keys[extra_key][1] if not nsubkey: nsubkey = cur_pkg except KeyError: nkey = extra_key nsubkey = cur_pkg if not isinstance(extra_val, list): extra_val = [extra_val] if nkey not in self.spec_extra: self.spec_extra[nkey] = {} self.spec_extra[nkey][nsubkey] = extra_val continue if isinstance(value, list): fp.write(cur_indent + "%s:\n" % (key)) for item in value: if isinstance(item, list): # only 'SubPackges' will reach here # cur_pkg will be the 1st pair ('Name', subpkg) self._dump_yaml(item, fp, cur_indent + TAB, cur_pkg = item[0][1]) fp.write("\n") else: fp.write(cur_indent + TAB + "- %s\n" % (self._esc_value(item))) elif isinstance(value, bool): if value: fp.write(cur_indent + "%s: yes\n" % (key)) else: fp.write(cur_indent + "%s: no\n" % (key)) else: lines_to_write = value.splitlines() if len(lines_to_write) == 1: fp.write(cur_indent + "%s: %s\n" % (key, self._esc_value(value))) elif len(lines_to_write) == 0: # not exist until now fp.write(cur_indent + "%s:\n" % (key)) else: fp.write(cur_indent + "%s: |\n" % key) for line in lines_to_write: fp.write(cur_indent + TAB + "%s\n" % line) first_line = False def _update_spec(self): import specify return specify.generate_rpm(self.opath, True, self.spec_extra) [0] def dump(self, data, format = None): if not format: format = self.format fp = sys.stdout if self.opath: try: fp = file(self.opath, 'w') except IOError: logger.warning('Cannot open file %s for writing' % self.opath) # print out pass try: if format == 'yaml': self._dump_yaml(data, fp) else: logger.error('Unsupported spectacle data dump format: %s' %format) finally: fp.close() if self.spec_extra and self.opath: return self._update_spec() return None spectacle-0.22/spectacle/logger.py000066400000000000000000000051721153164731700172110ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os,sys import re __ALL__ = ['set_mode', 'info', 'warning', 'error', 'ask'] # COLORs in ANSI INFO_COLOR = 32 # green WARN_COLOR = 33 # yellow ERR_COLOR = 31 # red ASK_COLOR = 34 # blue PREFIX_RE = re.compile('^<(.*?)>\s*(.*)') INTERACTIVE = True def _color_print(head, color, msg = None, stream = sys.stdout): if os.getenv('ANSI_COLORS_DISABLED') is None: head = '\033[%dm%s:\033[0m' %(color, head) if msg: stream.write('%s %s\n' % (head, msg)) else: stream.write('%s ' % head) def _color_perror(head, color, msg): _color_print(head, color, msg, sys.stderr) def _split_msg(head, msg): m = PREFIX_RE.match(msg) if m: head += ' <%s>' % m.group(1) msg = m.group(2) return head, msg def set_mode(interactive): global INTERACTIVE if interactive: INTERACTIVE = True else: INTERACTIVE = False def info(msg): head, msg = _split_msg('Info', msg) _color_perror(head, INFO_COLOR, msg) def warning(msg): head, msg = _split_msg('Warning', msg) _color_perror(head, WARN_COLOR, msg) def error(msg): head, msg = _split_msg('Error', msg) _color_perror(head, ERR_COLOR, msg) sys.exit(1) def ask(msg, default=True): _color_print('Q', ASK_COLOR, '') try: if default: msg += '(Y/n) ' else: msg += '(y/N) ' if INTERACTIVE: repl = raw_input(msg) if repl.lower() == 'y': return True elif repl.lower() == 'n': return False else: return default else: sys.stdout.write('%s ' % msg) if default: sys.stdout.write('Y\n') else: sys.stdout.write('N\n') return default except KeyboardInterrupt: sys.stdout.write('\n') sys.exit(2) spectacle-0.22/spectacle/spec/000077500000000000000000000000001153164731700163055ustar00rootroot00000000000000spectacle-0.22/spectacle/spec/Makefile000066400000000000000000000006501153164731700177460ustar00rootroot00000000000000# ex: set tabstop=4 noexpandtab: PYTHON=python CHEETAH=cheetah TEMPLATES=$(wildcard *.tmpl) TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES)) .SECONDARY: $(TEMPLATE_MODS) all: $(TEMPLATE_MODS) %.py: %.tmpl $(CHEETAH) compile --settings='useStackFrames=False' $< cp $@ __init__.py clean: rm -f $(TEMPLATE_MODS) rm -f $(addsuffix .bak,$(TEMPLATE_MODS)) rm -f *.xsd *.wsdl rm -f *.pyc *.pyo rm -f *.py rm -f *.bak spectacle-0.22/spectacle/spec/spec.tmpl000066400000000000000000000542711153164731700201460ustar00rootroot00000000000000# ############################################## # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version ${metadata.MyVersion} # ############################################## ## ## Pre-defined const and functions #set $str_newline = '\n' #def arch_line($value, $pre='', $post='') #set $rarch, $arch, $value = $arch_split($value) #if $arch %ifarch $arch #end if ${pre}${value}${post}#slurp #if $arch %endif#slurp #end if #end def ################### ## Macros # >> macros #if $extra.content.has_key("macros") and $extra.content.macros.has_key("main") $str_newline.join($extra.content.macros.main) #end if # << macros #if $extra.HasStatic %define keepstatic 1 #set $cfgstatic = "" #else #set $cfgstatic = "--disable-static" #end if #if $metadata.has_key('Builder') #set $Builder = $metadata.Builder #else ## default #set $Builder = 'make' #end if #if $Builder == 'python' #if $metadata.has_key("BuildArch") and $metadata.BuildArch == 'noarch' %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} #else %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} #end if #end if Name: ${metadata.Name} Summary: ${metadata.Summary} Version: ${metadata.Version} Release: ${metadata.Release} #if $metadata.has_key("Epoch") Epoch: ${metadata.Epoch} #set $auto_depend = "%{epoch}:%{version}-%{release}" #else #set $auto_depend = "%{version}-%{release}" #end if Group: ${metadata.Group} License: ${metadata.License} #if $metadata.has_key("ExclusiveArch") ExclusiveArch: ${metadata.ExclusiveArch} #end if #if $metadata.has_key("BuildArch") BuildArch: ${metadata.BuildArch} #end if #if $metadata.has_key("Prefix") Prefix: ${metadata.Prefix} #end if #if $metadata.has_key("URL") URL: ${metadata.URL} #end if ## Sources #if $metadata.has_key("Sources") #set $idx = 0 #for $source in $metadata.Sources Source${idx}: $source #set $idx = $idx + 1 #end for #end if Source100: ${metadata.Name}.yaml #if $metadata.has_key("RpmLintIgnore") Source101: ${metadata.Name}-rpmlintrc #end if ## Patches #if $metadata.has_key("Patches") #set $idx = 0 #for $patch in $metadata.Patches $arch_line($patch, "Patch%d: "%$idx) #set $idx = $idx + 1 #end for ## each patch #end if #if 'NoAutoReq' in $metadata AutoReq: 0 #end if #if 'NoAutoReqProv' in $metadata AutoReqProv: 0 #end if ## Requires #if $Builder == 'perl' Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo \$version)) #end if #if $metadata.has_key("Requires") #for $req in $metadata.Requires $arch_line($req, 'Requires: ') #end for ## each req #end if #if $metadata.has_key("RequiresPre") #for $req in $metadata.RequiresPre Requires(pre): $req #end for #end if #if $metadata.has_key("RequiresPreUn") #for $req in $metadata.RequiresPreUn Requires(preun): $req #end for #end if #if $metadata.has_key("RequiresPost") #for $req in $metadata.RequiresPost Requires(post): $req #end for #end if #if $metadata.has_key("RequiresPostUn") #for $req in $metadata.RequiresPostUn Requires(postun): $req #end for #end if ## BuildRequires #if $metadata.has_key("PkgConfigBR") #for $br in $metadata.PkgConfigBR #set $br_comps = $br.split() #if $len($br_comps) > 1 $arch_line($br_comps[0], "BuildRequires: pkgconfig(", ")%s" % $br[$len($br_comps[0]):]) #else $arch_line($br, "BuildRequires: pkgconfig(", ")") #end if #end for ## each br #end if #set $br_locale = "" #if $metadata.has_key("PkgBR") #for $br in $metadata.PkgBR #if $br == 'intltool' and not $metadata.has_key("LocaleName") and not $metadata.has_key("NoAutoLocale") #set $br_locale = $metadata.Name #end if $arch_line($br, "BuildRequires: ") #end for ## each br #end if ## BuildConflicts #if $metadata.has_key("BuildConflicts") #for $bcfl in $metadata.BuildConflicts BuildConflicts: $bcfl #end for #end if #if $metadata.has_key("RunFdupes") BuildRequires: fdupes #end if #if 'NoAutoProv' in $metadata AutoProv: 0 #end if ## Provides #if $metadata.has_key("Provides") #for $prd in $metadata.Provides Provides: $prd #end for #end if ## Conflicts #if $metadata.has_key("Conflicts") #for $cfl in $metadata.Conflicts Conflicts: $cfl #end for #end if ## Obsoletes #if $metadata.has_key("Obsoletes") #for $obs in $metadata.Obsoletes Obsoletes: $obs #end for #end if #if 'SupportOtherDistros' in $metadata BuildRoot: %{_tmppath}/%{name}-%{version}-build #end if %description #if $metadata.has_key("Description") ${metadata.Description} #else Description: %{summary} #end if #if $metadata.has_key("AutoSubPackages") #for $sp in $metadata.AutoSubPackages %package $sp Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = $auto_depend %description $sp Development files for %{name} #end for #end if #if $metadata.has_key("SubPackages") #for $sp in $metadata.SubPackages #set $sub_extra = $extra.subpkgs[$sp.Name] #if $sp.has_key("AsWholeName") %package -n $sp.Name #else %package $sp.Name #end if Summary: $sp.Summary #if $sp.has_key("License") License: $sp.License #end if #if $sp.has_key("Group") Group: $sp.Group #else Group: ${metadata.Group} #end if #if $sp.has_key("Version") Version: $sp.Version #end if #if $sp.has_key("Release") Release: $sp.Release #end if #if $sp.has_key("Epoch") Epoch: $sp.Epoch #end if #if $sp.has_key("URL") URL: $sp.URL #end if #if $sp.has_key("BuildArch") BuildArch: $sp.BuildArch #end if #if $sp.has_key("Prefix") Prefix: $sp.Prefix #end if #if 'NoAutoReq' in $sp AutoReq: 0 #end if #if 'NoAutoProv' in $sp AutoProv: 0 #end if #if 'NoAutoReqProv' in $sp AutoReqProv: 0 #end if #if $sp.has_key("AutoDepend") and not $metadata.has_key("NoFiles") Requires: %{name} = $auto_depend #end if #if $sp.has_key("Requires") #for $req in $sp.Requires $arch_line($req, "Requires: ") #end for ## each req #end if #if $sp.has_key("RequiresPre") #for $req in $sp.RequiresPre Requires(pre): $req #end for #end if #if $sp.has_key("RequiresPreUn") #for $req in $sp.RequiresPreUn Requires(preun): $req #end for #end if #if $sp.has_key("RequiresPost") #for $req in $sp.RequiresPost Requires(post): $req #end for #end if #if $sp.has_key("RequiresPostUn") #for $req in $sp.RequiresPostUn Requires(postun): $req #end for #end if ## Provides #if $sp.has_key("Provides") #for $prd in $sp.Provides Provides: $prd #end for #end if ## Conflicts #if $sp.has_key("Conflicts") #for $cfl in $sp.Conflicts Conflicts: $cfl #end for #end if ## Obsoletes #if $sp.has_key("Obsoletes") #for $obs in $sp.Obsoletes Obsoletes: $obs #end for #end if ## BR #if $sp.has_key("PkgBR") #for $br in $sp.PkgBR $arch_line($br, "BuildRequires: ") #end for ## each br #end if ## PkgConfigBR #if $sp.has_key("PkgConfigBR") #for $br in $sp.PkgConfigBR #set $br_comps = $br.split() #if $len($br_comps) > 1 $arch_line($br_comps[0], "BuildRequires: pkgconfig(", ")%s" % $br[$len($br_comps[0]):]) #else $arch_line($br, "BuildRequires: pkgconfig(", ")") #end if #end for ## each br #end if ## BuildConflicts #if $sp.has_key("BuildConflicts") #for $bcfl in $sp.BuildConflicts BuildConflicts: $bcfl #end for #end if #if $sp.has_key("AsWholeName") %description -n $sp.Name #else %description $sp.Name #end if #if $sp.has_key('Description') $sp.Description #else Description: %{summary} #end if #end for #end if ############################ prep scripts %prep #if $metadata.has_key("Sources") #if $metadata.has_key("NoSetup") # No setup #else if $metadata.has_key("SetupOptions") %setup $metadata.SetupOptions #else %setup -q -n $metadata.SourcePrefix #end if #end if ## has Sources ## Applying patches #if $metadata.has_key("Patches") #set $idx = 0 #for $patch in $metadata.Patches #if "PatchCmts" in $metadata $metadata.PatchCmts[$idx] #end if #if 'PatchOpts' in $metadata $arch_line($patch, "# ", "\n%%patch%d %s"%($idx, $metadata.PatchOpts[$idx])) #else $arch_line($patch, "# ", "\n%%patch%d -p1"%$idx) #end if #set $idx = $idx + 1 #end for ## each patch #end if # >> setup #if $extra.content.has_key("setup") and $extra.content.setup.has_key("main") $str_newline.join($extra.content.setup.main) #end if # << setup ############################ build scripts %build #if not $metadata.has_key('UseAsNeeded') unset LD_AS_NEEDED #end if # >> build pre #if $extra.content.has_key("build") and $extra.content.build.has_key("pre") $str_newline.join($extra.content.build.pre) #end if # << build pre ############################ #if $Builder == 'python' CFLAGS="\$RPM_OPT_FLAGS" %{__python} setup.py build #else if $Builder == 'qmake' #set $Configure = 'none' #if 'SupportOtherDistros' in $metadata %if 0%{?moblin_version} %qmake #slurp #if 'QMakeOptions' in $metadata \ #else #end if %else qmake -makefile -nocache \ "QMAKE_CFLAGS_RELEASE=\${CFLAGS:-%optflags}" \ "QMAKE_CFLAGS_DEBUG=\${CFLAGS:-%optflags}" \ "QMAKE_CXXFLAGS_RELEASE=\${CXXFLAGS:-%optflags}" \ "QMAKE_CXXFLAGS_DEBUG=\${CXXFLAGS:-%optflags}" \ QMAKE_STRIP=: \ PREFIX=%{_prefix} #slurp #if 'QMakeOptions' in $metadata \ #else #end if %endif #else %qmake #slurp #if 'QMakeOptions' in $metadata \ #else #end if #end if #if 'QMakeOptions' in $metadata #set $length = len($metadata.QMakeOptions) #set $idx = 1 #for $opt in $metadata.QMakeOptions #if $idx == $length $arch_line($opt, " ") #else $arch_line($opt, " ", " \\") #end if #set $idx = $idx + 1 #end for #end if ## QMakeOptions make %{?jobs:-j%jobs} #else if $Builder == 'perl' if test -f Makefile.PL; then %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?jobs:-j%jobs} else %{__perl} Build.PL --installdirs vendor ./Build fi #else ####### #if $metadata.has_key('Configure') #set $Configure = $metadata.Configure ####### #else ## default #if $Builder == 'cmake' #set $Configure = 'cmake' #else #set $Configure = 'configure' #end if #end if ####### #if $Configure == 'autogen' %autogen $cfgstatic %configure $cfgstatic#slurp #else if $Configure == 'cmake' mkdir meego-build cd meego-build cmake .. #slurp #else if $Configure == 'configure' %configure $cfgstatic#slurp #else if $Configure == 'reconfigure' %reconfigure $cfgstatic#slurp #else if $Configure == 'cmake' %reconfigure $cfgstatic#slurp #end if ## any other values fall thru to 'noconfigure' #if ( $Configure != 'noconfigure' or $Configure != 'none' ) and $metadata.has_key("ConfigOptions") \ #set $length = len($metadata.ConfigOptions) #set $idx = 1 #for $opt in $metadata.ConfigOptions ## checking arch namespace prefix #if $idx == $length $arch_line($opt, " ") #else $arch_line($opt, " ", " \\") #end if #set $idx = $idx + 1 #end for #end if ## ConfigOptions #if $Builder == 'make' or $Builder == 'cmake' make %{?jobs:-j%jobs} #else if $Builder == 'single-make' make #else if $Builder != 'no-make' and $Builder != 'none' and $Builder != 'no-builder' $Builder #end if #end if ## Builder == python ############################ # >> build post #if $extra.content.has_key("build") and $extra.content.build.has_key("post") $str_newline.join($extra.content.build.post) #end if # << build post ############################ installation scripts %install #if 'SupportOtherDistros' in $metadata rm -rf \$RPM_BUILD_ROOT #else rm -rf %{buildroot} #end if # >> install pre #if $extra.content.has_key("install") and $extra.content.install.has_key("pre") $str_newline.join($extra.content.install.pre) #end if # << install pre #if $Builder == 'python' #if 'SupportOtherDistros' in $metadata %if 0%{?suse_version} %{__python} setup.py install --root=\$RPM_BUILD_ROOT --prefix=%{_prefix} %else %{__python} setup.py install --root=\$RPM_BUILD_ROOT -O1 %endif #else %{__python} setup.py install --root=%{buildroot} -O1 #end if #else if $Builder == 'perl' if test -f Makefile.PL; then make pure_install PERL_INSTALL_ROOT=%{buildroot} else ./Build install --installdirs vendor fi find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';' %{_fixperms} %{buildroot}/* #else if $Builder == 'qmake' #if 'SupportOtherDistros' in $metadata %if 0%{?moblin_version} %qmake_install %else %makeinstall %endif #else %qmake_install #end if #else if $Builder == 'make' or $Builder == 'single-make' or $Builder == 'cmake' #if 'SupportOtherDistros' in $metadata %if 0%{?moblin_version} %make_install %else %makeinstall %endif #else #if $Builder == 'cmake' cd meego-build #end if %make_install #end if #end if ## of Builder==??? #if $metadata.has_key("ExtraInstall") $metadata.ExtraInstall #end if # >> install post #if $extra.content.has_key("install") and $extra.content.install.has_key("post") $str_newline.join($extra.content.install.post) #end if # << install post #if $extra.Desktop desktop-file-install --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/*.desktop #end if #if $metadata.has_key("LocaleName") #if $metadata.has_key("LocaleOptions") #set $localeopt_str = $metadata["LocaleOptions"] %find_lang ${metadata.LocaleName} $localeopt_str #else %find_lang ${metadata.LocaleName} #end if #else if $br_locale != "" %find_lang $br_locale #end if ############################ run fdupes #if $metadata.has_key("RunFdupes") #for $fditem in $metadata.RunFdupes %fdupes %{buildroot}/$fditem #end for #end if ############################ optional check scripts #if $metadata.has_key("Check") %check # >> check #if $extra.content.has_key("check") $str_newline.join($extra.content.check.main) #else #if $Builder == 'perl' if test -f Makefile.PL; then make test else ./Build test fi #else make check #end if #end if # << check #end if ############################ Pre #set $has_extra_pre = $extra.content.has_key("pre") and $extra.content.pre.has_key("main") #if $extra.Schema or $has_extra_pre %pre ## -Schema #if $extra.Schema if [ "$1" -gt 1 ]; then #for $schema in $extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule \ $schema \ > /dev/null || : #end for fi #end if ## -Extra pre #if $has_extra_pre # >> pre $str_newline.join($extra.content.pre.main) # << pre #end if #end if ############################ PreUn #set $has_extra_preun = $extra.content.has_key("preun") and $extra.content.preun.has_key("main") #if $extra.Schema or $has_extra_preun %preun ## -Schema #if $extra.Schema if [ "$1" -eq 0 ]; then #for $schema in $extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule \ $schema \ > /dev/null || : #end for fi #end if ## -Extra preun #if $has_extra_preun # >> preun $str_newline.join($extra.content.preun.main) # << preun #end if #end if ############################ Post #set $has_extra_post = $extra.content.has_key("post") and $extra.content.post.has_key("main") and $extra.content.post.main #if $extra.Lib or $extra.Info or $extra.Schema or $extra.Icon or $extra.DesktopDB or $has_extra_post #set $only_Lib = not ($extra.Info or $extra.Schema or $extra.Icon or $extra.DesktopDB or $has_extra_post) #if $only_Lib %post -p /sbin/ldconfig #else %post #end if ## -Lib #if $extra.Lib and not $only_Lib /sbin/ldconfig #end if ## -Schema #if $extra.Schema #for $schema in $extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule \ $schema > /dev/null || : #end for #end if ## -Info #if $extra.Info #for $inf in $extra.Infos %install_info --info-dir=%_infodir $inf #end for #end if ## -Icon #if $extra.Icon /bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache \ --quiet %{_datadir}/icons/hicolor 2> /dev/null|| : #end if ## -DesktopDB #if $extra.DesktopDB update-desktop-database %{_datadir}/applications &> /dev/null || : #end if ## -Extra Post Script #if $has_extra_post # >> post $str_newline.join($extra.content.post.main) # << post #end if #end if ## need post ############################ PostUn #set $has_extra_postun = $extra.content.has_key("postun") and $extra.content.postun.has_key("main") and $extra.content.postun.main #if $extra.Lib or $extra.Info or $extra.Icon or $extra.DesktopDB or $has_extra_postun #set $only_Lib = not ($extra.Info or $extra.Icon or $extra.DesktopDB or $has_extra_postun) #if $only_Lib %postun -p /sbin/ldconfig #else %postun #end if #if $extra.Lib and not $only_Lib /sbin/ldconfig #end if ## -Info #if $extra.Info if [ $1 = 0 ] ;then #for $inf in $extra.Infos %install_info_delete --info-dir=%{_infodir} $inf #end for fi #end if ## -Icon #if $extra.Icon /bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache \ --quiet %{_datadir}/icons/hicolor 2> /dev/null|| : #end if ## -DesktopDB #if $extra.DesktopDB update-desktop-database %{_datadir}/applications &> /dev/null || : #end if ## -Extra Postun Script #if $has_extra_postun # >> postun $str_newline.join($extra.content.postun.main) # << postun #end if #end if ## need postun ######################################## ## Pre/Preun/Post/Postun for SubPackages #if $metadata.has_key("SubPackages") #for $sp in $metadata.SubPackages #if $sp.has_key("AsWholeName") #set $pkg_name = "-n " + $sp.Name #else #set $pkg_name = $sp.Name #end if #set $sub_extra = $extra.subpkgs[$sp.Name] ####################### ## Pre for SubPackages #set $has_extra_pre = $extra.content.has_key("pre") and $extra.content.pre.has_key($sp.Name) #if $sub_extra.Schema or $has_extra_pre %pre $pkg_name ## -Schema #if $sub_extra.Schema if [ "$1" -gt 1 ]; then #for $schema in $sub_extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule \ $schema \ > /dev/null || : #end for fi #end if ## -Extra pre #if $has_extra_pre # >> pre $sp.Name $str_newline.join($extra.content.pre[$sp.Name]) # << pre $sp.Name #end if #end if ####################### ## Preun for SubPackages #set $has_extra_preun = $extra.content.has_key("preun") and $extra.content.preun.has_key($sp.Name) #if $sub_extra.Schema or $has_extra_preun %preun $pkg_name ## -Schema #if $sub_extra.Schema if [ "$1" -eq 0 ]; then #for $schema in $sub_extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule \ $schema \ > /dev/null || : #end for fi #end if ## -Extra preun #if $has_extra_preun # >> preun $sp.Name $str_newline.join($extra.content.preun[$sp.Name]) # << preun $sp.Name #end if #end if ####################### ## Post for SubPackages #set $has_extra_post = $extra.content.has_key("post") and $extra.content.post.has_key($sp.Name) and $extra.content.post[$sp.Name] #if $sub_extra.Lib or $sub_extra.Info or $sub_extra.Icon or $sub_extra.Schema or $sub_extra.DesktopDB or $has_extra_post #set $only_Lib = not ($sub_extra.Info or $sub_extra.Icon or $sub_extra.Schema or $sub_extra.DesktopDB or $has_extra_post) #if $only_Lib %post $pkg_name -p /sbin/ldconfig #else %post $pkg_name #end if ## -Lib #if $sub_extra.Lib and not $only_Lib /sbin/ldconfig #end if ## -Schema #if $sub_extra.Schema #for $schema in $sub_extra.Schemas export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule \ $schema > /dev/null || : #end for #end if ## -Info #if $sub_extra.Info #for $inf in $sub_extra.Infos %install_info --info-dir=%_infodir $inf #end for #end if ## Info ## -Icon #if $sub_extra.Icon /bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache \ --quiet %{_datadir}/icons/hicolor 2> /dev/null|| : #end if ## -DesktopDB #if $sub_extra.DesktopDB update-desktop-database %{_datadir}/applications &> /dev/null || : #end if ## -Extra Post Script #if $has_extra_post # >> post $sp.Name $str_newline.join($extra.content.post[$sp.Name]) # << post $sp.Name #end if #end if ## need post ####################### ## PostUn for SubPackages #set $has_extra_postun = $extra.content.has_key("postun") and $extra.content.postun.has_key($sp.Name) and $extra.content.postun[$sp.Name] #if $sub_extra.Lib or $sub_extra.Info or $sub_extra.Icon or $sub_extra.DesktopDB or $has_extra_postun #set $only_Lib = not ($sub_extra.Info or $sub_extra.Icon or $sub_extra.DesktopDB or $has_extra_postun) #if $only_Lib %postun $pkg_name -p /sbin/ldconfig #else %postun $pkg_name #end if #if $sub_extra.Lib and not $only_Lib /sbin/ldconfig #end if #if $sub_extra.Info if [ $1 = 0 ] ;then #for $inf in $sub_extra.Infos %install_info_delete --info-dir=%{_infodir} $inf #end for fi #end if ## Info ## -Icon #if $sub_extra.Icon /bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache \ --quiet %{_datadir}/icons/hicolor 2> /dev/null|| : #end if ## -DesktopDB #if $sub_extra.DesktopDB update-desktop-database %{_datadir}/applications &> /dev/null || : #end if ## -Extra Postun Script #if $has_extra_postun # >> postun $sp.Name $str_newline.join($extra.content.postun[$sp.Name]) # << postun $sp.Name #end if #end if ## need postun #end for ## per subpackage #end if ## has subpackages #if not $metadata.has_key("NoFiles") #if $metadata.has_key("LocaleName") %files -f ${metadata.LocaleName}.lang #else if $br_locale != "" %files -f ${br_locale}.lang #else if $metadata.has_key('FilesInput') %files -f $metadata.FilesInput #else %files #end if %defattr(-,root,root,-) ## TODO to be cleanup #if $metadata.has_key("Documents") #for $doc in $metadata.Documents %doc $doc #end for #end if #if "Files" in $metadata: #for $f in $metadata.Files $f #end for #end if # >> files #if $extra.content.has_key("files") and $extra.content.files.has_key("main") $str_newline.join($extra.content.files.main) #end if # << files #end if ## not NoFiles #if $metadata.has_key("AutoSubPackages") #for $sp in $metadata.AutoSubPackages %files $sp %defattr(-,root,root,-) # >> files $sp #if $extra.content.has_key("files") and $extra.content.files.has_key($sp) $str_newline.join($extra.content.files[$sp]) #end if # << files $sp #end for #end if ## files for subpkgs #if $metadata.has_key("SubPackages") #for $sp in $metadata.SubPackages #if $sp.has_key("AsWholeName") #set $pkg_name = "-n " + $sp.Name #else #set $pkg_name = $sp.Name #end if #if $sp.has_key('FilesInput') %files $pkg_name -f $sp.FilesInput #else %files $pkg_name #end if %defattr(-,root,root,-) ## TODO to be cleanup #if $sp.has_key("Documents") #for $doc in $sp.Documents %doc $doc #end for #end if #if "Files" in $sp: #for $f in $sp.Files $f #end for #end if # >> files $sp.Name #if $extra.content.has_key("files") and $extra.content.files.has_key($sp.Name) $str_newline.join($extra.content.files[$sp.Name]) #end if # << files $sp.Name #end for #end if spectacle-0.22/spectacle/specify.py000066400000000000000000001630311153164731700173730ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os, sys import re import tempfile import shutil import copy import datetime import csv import tarfile # third-party modules import yaml # internal modules import __version__ import spec import logger from vercmp import FairVersion as _V SERIES_PATH = 'series.conf' MAND_KEYS = ('Name', 'Summary', 'Description', 'Version', 'Group', 'License', ) SUB_MAND_KEYS = ('Name', 'Summary', 'Description', 'Group', ) # boolean keys with the default 'False' value BOOLNO_KEYS = ('Check', 'SupportOtherDistros', 'NoAutoReq', 'NoAutoProv', 'NoAutoReqProv', 'NoSetup', 'NoAutoLocale', 'AsWholeName', 'NoFiles', 'NoDesktop', 'UpdateDesktopDB', 'NoIconCache', ) # boolean keys with the default 'True' value BOOLYES_KEYS = ('UseAsNeeded', 'AutoDepend', ) BOOL_KEYS = BOOLNO_KEYS + BOOLYES_KEYS LIST_KEYS = ('Sources', 'ExtraSources', 'Patches', 'ConfigOptions', 'QMakeOptions', 'Requires', 'RequiresPre', 'RequiresPreUn', 'RequiresPost', 'RequiresPostUn', 'PkgBR', 'PkgConfigBR', 'Provides', 'Conflicts', 'BuildConflicts', 'Obsoletes', 'AutoSubPackages', 'Files', 'Documents', 'RunFdupes', 'RpmLintIgnore' ) STR_KEYS = ('Name', 'Summary', 'Description', 'Version', 'Release', 'Epoch', 'Group', 'License', 'URL', 'SCM', 'Archive', 'BuildArch', 'ExclusiveArch', 'SourcePrefix', 'Configure', 'Builder', 'SetupOptions', 'LocaleName', 'LocaleOptions', 'FilesInput', 'PostScripts', 'Prefix', ) SUBONLY_KEYS = ('AsWholeName', 'AutoDepend', ) SUBWARN_KEYS = ('PkgBR', 'PkgConfigBR', 'BuildConflicts', ) SUBAVAIL_KEYS = ('Name', 'Summary', 'Description', 'Group', 'License', 'Files', 'Prefix', 'Requires', 'RequiresPre', 'RequiresPreUn', 'RequiresPost', 'RequiresPostUn', 'Provides', 'Conflicts', 'Obsoletes', 'NoAutoReq', 'NoAutoProv', 'NoAutoReqProv', 'NoIconCache', 'FilesInput', 'Version', 'Release', 'Epoch', 'URL', 'BuildArch' # very rare ) DROP_KEYS = ('PostScripts', 'Documents', ) RENAMED_KEYS = {'NeedCheckSection': 'Check', 'NoLocale': 'NoAutoLocale', } TYPO_KEYS = {'BuildRequires': 'PkgBR or PkgConfigBR', 'Url': 'URL', } ARCHED_KEYS = ('Requires', 'PkgBR', 'PkgConfigBR', 'Patches', 'ConfigOptions', 'QMakeOptions', ) ARCHS = {'ix86': '%{ix86}', 'arm': '%{arm}', 'armv5': 'armv5el armv5tel armv5tejl', 'armv7': 'armv7el armv7tel armv7l armv7hl armv7nhl', } CONFIGURES = ('configure', 'reconfigure', 'autogen', 'cmake', 'none') BUILDERS = ('make', 'single-make', 'python', 'perl', 'qmake', 'cmake', 'none') # global helper functions def arch_split(value): m = re.match('^(\w+):([^:]+)', value) if m: arch = m.group(1) left = m.group(2) if arch in ARCHS: return arch, ARCHS[arch], left else: return arch, arch, left else: return '', '', value class GitAccess(): def __init__(self, path): self.path = path def _gettags(self): tags = {} try: fh = os.popen('git ls-remote --tags "%s" 2>/dev/null' % self.path) prefix = 'refs/tags/' for line in fh: line = line.strip() node, tag = line.split(None, 1) if not tag.startswith(prefix): continue tagx = tag[len(prefix):len(tag)] tags[tagx] = node except KeyboardInterrupt: sys.exit(2) return tags def get_toptag(self): vers = [_V(tag) for tag in self._gettags()] if vers: vers.sort() return str(vers[-1]) return None class RPMWriter(): """ The following keys will be generated on the fly based on values from YAML, and transfered to tmpl: MyVersion: version of spectacle ExtraInstall: extra install script for 'ExtraSources' """ extra_per_pkg = { 'Desktop': False, 'DesktopDB': False, 'Schema': False, 'Schemas': [], 'Lib': False, 'HasStatic': False, 'Icon': False, 'Service': False, 'Info': False, 'Infos': [], } def __init__(self, yaml_fpath, spec_fpath=None, clean_old=False, download_new=True, skip_scm=False): self.yaml_fpath = yaml_fpath now = datetime.datetime.now() self.metadata = {'MyVersion': __version__.VERSION, 'Date': now.strftime("%Y-%m-%d")} self.pkg = None self.version = None self.release = None self.specfile = spec_fpath self.packages = {} self.clean_old = clean_old self.download_new = download_new self.skip_scm = skip_scm self.uiwidget = None # default as gtk2 if Qt not detected # initialize extra info for spec self.extra = { 'subpkgs': {}, 'content': {} } # update extra info for main package self.extra.update(copy.deepcopy(self.extra_per_pkg)) # record filelist from 'ExtraSources' directive self.extras_filelist = [] try: self.stream = file(yaml_fpath, 'r') except IOError: logger.error('Cannot read file: %s' % yaml_fpath) def dump(self): # debugging import pprint pprint.pprint(yaml.dump(yaml.load(self.stream))) def _check_dup_files(self, files): # try to remove duplicate '%defattr' in files list dup1 = '%defattr(-,root,root,-)' dup2 = '%defattr(-,root,root)' found_dup = dup1 if dup1 in files else dup2 if dup2 in files else None if found_dup: logger.warning('found duplicate "%s" in file list, removed!' % found_dup) files.remove(found_dup) def _check_dup_ldconfig(self, pkgname = None): if not pkgname: pkgname = 'main' if not self.extra['Lib']: return else: if not self.extra['subpkgs'][pkgname]['Lib']: return dup1 = '/sbin/ldconfig' dup2 = 'ldconfig' for sec in ('post', 'postun'): try: extra = self.extra['content'][sec][pkgname] except KeyError: continue found_dup = dup1 if dup1 in extra else dup2 if dup2 in extra else None if found_dup: extra.remove(found_dup) logger.warning('Found duplicate "%s" calling in "%%%s" of %s package, removed!' % (found_dup, sec, pkgname)) def _check_dup_scriptlets(self, pkgname = None): if not pkgname: pkgname = 'main' extra = self.extra else: extra = self.extra['subpkgs'][pkgname] if extra['Desktop']: re_idstr = re.compile('^desktop-file-install\s+') try: lines = extra['content']['install']['pre'] + \ extra['content']['install']['post'] except KeyError: pass else: for line in lines: if re_idstr.match(line): logger.warning('Found possible duplicate "desktop-file-install" script in post install') break if extra['DesktopDB']: re_idstr = re.compile('^update-desktop-database\s+') for sec in ('post', 'postun'): try: lines = self.extra['content'][sec][pkgname] except KeyError: continue for line in lines: if re_idstr.match(line): logger.warning('Found possible duplicate "update-desktop-database" script in %%%s of %s package'%(sec, pkgname)) break if extra['Info']: re_idstr = re.compile('^%install_info') for sec in ('post', 'postun'): try: lines = self.extra['content'][sec][pkgname] except KeyError: continue for line in lines: if re_idstr.match(line): logger.warning('Found possible duplicate "%%install_info..." script in %%%s of %s package'%(sec, pkgname)) break if extra['Icon']: re_idstr = re.compile('^/bin/touch\s+.*%{_datadir}/icons/hicolor.*') re_idstr2 = re.compile('gtk-update-icon-cache\s+') for sec in ('post', 'postun'): try: lines = self.extra['content'][sec][pkgname] except KeyError: continue for line in lines: if re_idstr.match(line): logger.warning('Found possible duplicate script to touch icons in %%%s of %s package'%(sec, pkgname)) elif re_idstr2.search(line): logger.warning('Found possible duplicate "gtk-update-icon-cache" script in %%%s of %s package'%(sec, pkgname)) if extra['Schema']: re_idstr = re.compile('gconftool-2\s+') for sec in ('post', 'pre', 'preun'): try: lines = self.extra['content'][sec][pkgname] except KeyError: continue for line in lines: if re_idstr.search(line): logger.warning('Found possible duplicate "gconftool-2" script in %%%s of %s package'%(sec, pkgname)) break def sanity_check(self): def _check_empty_keys(metadata): """ return the empty keys """ keys = [] for key in metadata.keys(): if metadata[key] is None: keys.append(key) del metadata[key] return keys def _check_mandatory_keys(metadata, subpkg = False): """ return [] if all mandatory keys found, otherwise return the lost keys """ if subpkg: mkeys = list(SUB_MAND_KEYS) else: mkeys = list(MAND_KEYS) for key in metadata: if key in mkeys: mkeys.remove(key) if not mkeys: break return mkeys def _check_invalid_keys(metadata, subpkg = None): """ return list of invalid keys """ if not subpkg: # main package all_keys = list(LIST_KEYS + STR_KEYS + BOOL_KEYS + ('Date', 'MyVersion')) all_keys += RENAMED_KEYS.keys() all_keys.append('SubPackages') for key in SUBONLY_KEYS: all_keys.remove(key) else: # sub package all_keys = list(SUBAVAIL_KEYS + SUBWARN_KEYS + SUBONLY_KEYS) keys = [] for key in metadata: if key not in all_keys: keys.append(key) # whether the invalid keys are common typo for key in keys[:]: if key in TYPO_KEYS: logger.warning('"%s" might be a typo of %s, please correct it' %(key,TYPO_KEYS[key])) keys.remove(key) return keys def _check_subwarn_keys(metadata, subpkg): for key in SUBWARN_KEYS: if key in metadata: logger.warning('"%s" found in sub-pkg: %s, please consider to move it to main package' %(key, subpkg)) def _check_key_group(metadata): if metadata.has_key("Group"): warn = True try: for line in open("/usr/share/spectacle/GROUPS"): if metadata['Group'] in line: warn = False break except IOError: logger.error('Cannot open "/usr/share/spectacle/GROUPS", maybe the pkg was not installed correctly.') if warn: logger.warning('Group \'%s\' is not in the list of approved groups. See /usr/share/spectacle/GROUPS for the complete list.' % (metadata['Group'])) def _check_key_license(metadata): # warning for gplv3 gpl3_re = re.compile('L?GPL\s*v3', re.I) if metadata.has_key("License"): if gpl3_re.search(metadata['License']): logger.warning('GPLv3 related license might be unacceptable.') def _check_key_epoch(metadata): if 'Epoch' in metadata: logger.warning('Please consider to remove "Epoch"') def _check_pkgconfig(): try: pkgcfg = csv.reader(open('/usr/share/spectacle/pkgconfig-provides.csv'), delimiter=',') except IOError: logger.error('Cannot open "/usr/share/spectacle/pkgconfig-provides.csv", maybe the pkg was not installed correctly.') for row in pkgcfg: pc = re.search('pkgconfig\(([^)]+)\)', row[1]) m = pc.group(1) if self.packages.has_key(row[0]): ll = self.packages[row[0]] ll.append(m) self.packages[row[0]] = ll else: self.packages[row[0]] = [m] def _check_key_desc(metadata): """ sub-routine for 'description' checking """ if metadata['Description'] == '%{summary}' or \ metadata['Description'] == metadata['Summary']: return False return True def _check_listkey(metadata, key): """ sub-routine for LIST typed keys checking """ if key in metadata and not isinstance(metadata[key], list): return False return True def _check_strkey(metadata, key): """ sub-routine for STR typed keys checking """ if key in metadata and not isinstance(metadata[key], str) and not isinstance(metadata[key], unicode): return False return True def _check_boolkey(metadata, key): """ sub-routine for boolean typed keys checking """ if key in metadata and not isinstance(metadata[key], bool): return False return True def _check_arched_keys(metadata): """ sub-routine for ARCH namespace available keys """ def _check_arch(key, item): if isinstance(item, dict): logger.warning('For arch prefixed %s value "%s", please do NOT leave extra spaces after ":", skipped!' % \ (key, ':'.join(map(str, item.popitem())))) return False arch = arch_split(item)[0] if arch and arch not in ARCHS: logger.warning('unsupport arch namespace: %s in key %s' % (arch, key)) return True for key in ARCHED_KEYS: if key in metadata: if key in STR_KEYS: if not _check_arch(key, metadata[key]): del metadata[key] elif key in LIST_KEYS: for item in metadata[key]: if not _check_arch(key, item): metadata[key].remove(item) if not metadata[key]: del metadata[key] def _check_key_localename(metadata): """ sub-routine for 'LocaleName' checking """ if 'LocaleOptions' in metadata and 'LocaleName' not in metadata: return False return True def _check_dropped_keys(metadata): for key in DROP_KEYS: if key in metadata: logger.warning('Deprecated key: %s found, please use other valid keys' % key) def _check_renamed_keys(metadata): for key in RENAMED_KEYS: if key in metadata: metadata[RENAMED_KEYS[key]] = metadata[key] del metadata[key] logger.warning('Renamed key: %s found, please use %s instead' % (key, RENAMED_KEYS[key])) def _check_key_setups(metadata): if 'NoSetup' in metadata: if 'SetupOptions' in metadata: logger.warning('"SetupOptions" will have NO effect when "NoSetup" specified in YAML') if 'SourcePrefix' in metadata: logger.warning('"SourcePrefix" will have NO effect when "NoSetup" specified in YAML') else: if 'SetupOptions' in metadata and 'SourcePrefix' in metadata: logger.warning('"SourcePrefix" will have NO effect when "SetupOptions" specified in YAML') def _check_key_nofiles(metadata): if 'Files' in metadata: logger.error('both "NoFiles" and "Files" exists in YAML, please correct it') for req in ('Requires', 'RequiresPre', 'RequiresPreUn', 'RequiresPost', 'RequiresPostUn', 'Provides', 'Conflicts', 'BuildConflicts', 'Obsoletes'): if req in metadata and metadata[req]: logger.warning('"NoFiles" exists, key %s has no effect any more' % req) def _check_key_configure(metadata): cfg = metadata['Configure'] if cfg not in CONFIGURES: logger.warning('"%s" is not a valid choice of Configure(%s)' % (cfg, '/'.join(CONFIGURES))) def _check_key_builder(metadata): builder = metadata['Builder'] if builder not in BUILDERS: logger.warning('"%s" is not a valid choice of Builder(%s)' % (builder, '/'.join(BUILDERS))) # checking invalid 'Configure' for special builder if builder in ('python', 'perl', 'qmake', 'cmake') and \ 'Configure' in metadata and metadata['Configure'] != 'none': logger.warning('"%s" need no "Configure" setting which will be ignored' % builder) # checking for empty keys keys = _check_empty_keys(self.metadata) if keys: logger.warning('Please remove empty keys in main package: %s' % ', '.join(keys)) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: keys = _check_empty_keys(sp) if keys: logger.warning('Please remove empty keys in %s subpackage: %s' % (sp['Name'], ', '.join(keys))) # checking for mandatory keys keys = _check_mandatory_keys(self.metadata) if keys: logger.error('Missing mandatory keys for main package: %s' % ', '.join(keys)) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: keys = _check_mandatory_keys(sp, True) if keys: if 'Name' in keys: logger.error('Missing mandatory keys for sub-pkg: Name') else: logger.error('Missing mandatory keys for sub-pkg "%s": %s' % (sp['Name'], ', '.join(keys))) # checking for unexpected keys keys = _check_invalid_keys(self.metadata) if keys: logger.warning('Unexpected keys found: %s' % ', '.join(keys)) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: keys = _check_invalid_keys(sp, sp['Name']) if keys: logger.warning('Unexpected keys for sub-pkg %s found: %s' % (sp['Name'], ', '.join(keys))) # checking for questionable sub-package keys if "SubPackages" in self.metadata and 'NoFiles' not in self.metadata: for sp in self.metadata["SubPackages"]: keys = _check_subwarn_keys(sp, sp['Name']) # checking for deprecated keys _check_dropped_keys(self.metadata) # checking for renamed keys _check_renamed_keys(self.metadata) ######### Type checkings ########## # checking for LIST expected keys for key in LIST_KEYS: if not _check_listkey(self.metadata, key): logger.warning('the value of "%s" in main package is expected as list typed' % key) self.metadata[key] = [self.metadata[key]] if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if not _check_listkey(sp, key): logger.warning('the value of "%s" in "%s" sub-package is expected as list typed' % (key, sp['Name'])) sp[key] = [sp[key]] # checking for STR expected keys for key in STR_KEYS: if not _check_strkey(self.metadata, key): logger.warning('the value of "%s" in main package is expected as string typed' % key) if isinstance(self.metadata[key], list): self.metadata[key] = ' '.join(self.metadata[key]) else: del self.metadata[key] if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if not _check_strkey(sp, key): logger.warning('the value of "%s" in "%s" sub-package is expected as string typed' % (key, sp['Name'])) if isinstance(sp[key], list): sp[key] = ' '.join(sp[key]) else: del sp[key] # checking for BOOL expected keys for key in BOOL_KEYS: if not _check_boolkey(self.metadata, key): logger.warning('the value of "%s" in main package is expected as bool typed, dropped!' % key) # just drop it del self.metadata[key] if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if not _check_boolkey(sp, key): logger.warning('the value of "%s" in "%s" sub-package is expected as bool typed, dropped!' % (key, sp['Name'])) del sp[key] ######### checkings for special keys ########## # checking for arch namespace enabled keys _check_arched_keys(self.metadata) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: _check_arched_keys(sp) # checking for proposal pkgconfig requires if self.metadata.has_key("PkgBR"): _check_pkgconfig() pcbr = [] br = [] for p in self.metadata['PkgBR']: px = p.split()[0] for arch in ARCHS: prefix = arch + ':' if px.startswith(prefix): px = px[len(prefix):] pl = self.packages if pl.has_key(px): if len(pl[px]) == 1: pcbr.append(pl[px][0]) else: br.append(p) logger.warning("""Please use one of the followings: - %s in PkgConfigBR instead of %s in PkgBR""" %('\n - '.join(pl[px]), px)) else: br.append(p) if len(pcbr) > 0: if self.metadata.has_key('PkgConfigBR'): pcbr.extend(self.metadata['PkgConfigBR']) logger.info("""Proposal (multiple values skipped, please insert them manually): PkgConfigBR: - %s PkgBR: - %s """ %('\n - '.join(pcbr), '\n - '.join(br))) _check_key_epoch(self.metadata) # checking for meego valid groups _check_key_group(self.metadata) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: _check_key_group(sp) # checking for meego invalid licenses _check_key_license(self.metadata) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: _check_key_license(sp) # checking for validation of 'Description' if not _check_key_desc(self.metadata): logger.error('main package has no qualified "Description" tag\n\ \t"Description" cannot be "%{summary}" or equal to the value of "Summary"') if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if not _check_key_desc(sp): logger.error('sub-pkg: "%s" has no qualified "Description" tag\n\ \t"Description" cannot be "%%{summary}" or equal to the value of "Summary"' % sp['Name']) # checking for validation of 'LocaleName' and 'LocaleOptions' if not _check_key_localename(self.metadata): self.metadata['LocaleName'] = "%{name}" logger.warning('lost "LocaleName" keyword, use "%{name}" as default') # checking for validation of 'NoSetup', 'SetupOptions' and 'SourcePrefix' _check_key_setups(self.metadata) # checking for validation of 'NoFiles' if 'NoFiles' in self.metadata: _check_key_nofiles(self.metadata) # checking duplicate 'Files' items if 'Files' in self.metadata: self._check_dup_files(self.metadata['Files']) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if 'Files' in sp: self._check_dup_files(sp['Files']) # checking for validation of 'Configure and Builder' if 'Configure' in self.metadata: _check_key_configure(self.metadata) if 'Builder' in self.metadata: _check_key_builder(self.metadata) def _get_scm_latest_release(self): if "Archive" in self.metadata: archive = self.metadata['Archive'] if archive not in ('bzip2', 'gzip'): archive = 'bzip2' else: archive = 'bzip2' if archive == 'bzip2': appendix = 'bz2' else: appendix = 'gz' scm_url = self.metadata['SCM'] scm = GitAccess(scm_url) logger.info("Getting tags from SCM...") top = scm.get_toptag() if not top or top == self.version: # no need to fetch from SCM return logger.warning('Version in YAML shoud be updated according SCM tags') self.version = top self.metadata['Version'] = self.version pwd = os.getcwd() if os.path.exists("%s/%s-%s.tar.%s" %(pwd, self.pkg, self.version, appendix )): logger.info("Archive already exists, will not creating a new one") else: logger.info("Creating archive %s/%s-%s.tar.%s ..." % (pwd, self.pkg, self.version, appendix)) tmp = tempfile.mkdtemp() os.chdir(tmp) os.system('git clone %s' % scm_url) os.chdir( "%s/%s" %(tmp, self.pkg)) os.system(' git archive --format=tar --prefix=%s-%s/ %s | %s > %s/%s-%s.tar.%s' \ % (self.pkg, self.version, self.version, archive, pwd, self.pkg, self.version, appendix )) shutil.rmtree(tmp) os.chdir(pwd) def _download_sources(self): pkg = self.pkg rev = self.version sources = self.metadata['Sources'] for s in sources: if s.startswith('http://') or s.startswith('https://') or s.startswith('ftp://'): target = s.replace('%{name}', pkg) target = target.replace('%{version}', rev) f_name = os.path.basename(target) if not os.path.isfile(f_name): answer = logger.ask('Need to download source package: %s ?' % f_name) if not answer: break logger.info('Downloading latest source package from: %s' % target) import glob import urlgrabber from urlgrabber.progress import text_progress_meter try: urlgrabber.urlgrab(target, f_name, progress_obj = text_progress_meter()) except urlgrabber.grabber.URLGrabError, e: if e.errno == 14: # HTTPError logger.warning('Invalid source URL') else: raise e except KeyboardInterrupt: logger.info('Downloading is interrupted by ^C') else: # After download, asking to remove the possible old tarballs target = s.replace('%{name}', pkg) target = target.replace('%{version}', '*') globname = os.path.basename(target) for f in glob.glob(globname): if f == f_name: continue answer = logger.ask('Possible old source: %s, to delete it?' % f) if not answer: break try: os.remove(f) logger.info('%s Deleted!' % f) except OSError: logger.warning('Cannot delete %s' % f) def _analyze_source(self): def pc_files(members): for tarinfo in members: f = os.path.split(tarinfo.name)[1] xx = f.split(".pc.") if len(xx) > 1 and xx[1] == "in": extractfile buf = tarinfo.tobuf() tarball = None for uri in self.metadata['Sources']: fpath = os.path.basename(uri) fpath = fpath.replace('%{name}', self.pkg) fpath = fpath.replace('%{version}', self.version) if os.path.exists(fpath) and os.path.getsize(fpath): try: if tarfile.is_tarfile(fpath): tarball = fpath break except: logger.warning('Corrupt tarball %s found!' % fpath) pass prefix = None if tarball: tf = tarfile.open(tarball, 'r:*') for member in tf.getmembers(): if member.type == tarfile.DIRTYPE: prefix = member.name.rstrip('/') break #analyze_path = tempfile.mkdtemp(dir=os.getcwd(), prefix=".spectacle_") #tf.extractll(path=analyze_path, members=pc_files(tf)) for member in tf.getmembers(): f = os.path.split(member.name)[1] xx = f.split(".pc.") if len(xx) > 1 and xx[1] == "in": pc = tf.extractfile(member) # TODO tf.close() # confirm 'SourcePrefix' is valid if 'SourcePrefix' not in self.metadata and 'NoSetup' not in self.metadata: # setting the default value firstly self.metadata['SourcePrefix'] = '%{name}-%{version}' if not prefix or prefix == '.': # guess prefix from filename if tarball: if '.tar.' in tarball: prefix = os.path.basename(tarball).split('.tar.')[0] else: # strip the ext name prefix = os.path.splitext(tarball)[0] if prefix and prefix != '%s-%s' % (self.pkg, self.version): prefix = prefix.replace(self.pkg, '%{name}') prefix = prefix.replace(self.version, '%{version}') self.metadata['SourcePrefix'] = prefix def _parse_series(self): patches = [] comments = [] comment = '' for line in file(SERIES_PATH): if not line.strip(): continue if line.startswith('#'): comment += line else: line = line.strip() patches.append(line) comments.append(comment.rstrip()) comment = '' return patches, comments def _cleanup_boolkeys(self, items): """ clean up all boolean type keys, use the exists status to present bool value """ # for keys with default value FALSE for bopt in BOOLNO_KEYS: if bopt in items and not items[bopt]: del items[bopt] # for keys with default value TRUE for bopt in BOOLYES_KEYS: if bopt in items and not items[bopt]: del items[bopt] else: items[bopt] = True def _gen_auto_requires(self, metadata, extra, pkg_name = 'main'): auto_requires = { 'Lib': {'RequiresPost': ['/sbin/ldconfig'], 'RequiresPostUn': ['/sbin/ldconfig'], }, 'Icon': {'RequiresPost': ['/bin/touch', 'gtk2'], }, 'Desktop': {'PkgBR': ['desktop-file-utils'], }, 'DesktopDB': {'RequiresPost': ['desktop-file-utils'], 'RequiresPostUn': ['desktop-file-utils'], }, 'Info': {'RequiresPost': ['/sbin/install-info'], 'RequiresPostUn': ['/sbin/install-info'], }, 'Service': {'RequiresPost': ['/sbin/service', '/sbin/chkconfig'], 'RequiresPostUn': ['/sbin/service', '/sbin/chkconfig'], }, 'Schema': {'RequiresPost': ['GConf2'], 'RequiresPreUn': ['GConf2'], 'RequiresPre': ['GConf2'], }, } for key,reqs in auto_requires.iteritems(): if extra[key]: for req,items in reqs.iteritems(): if req in metadata: for i in items: # e.g. GConf2 >= 0.14 yaml_reqs = map(lambda s: s.split()[0], metadata[req]) if i in yaml_reqs: if i in metadata[req]: logger.warning('duplicate item: %s for %s in package %s' % (i,req,pkg_name)) # else do nothing else: metadata[req].append(i) else: metadata[req] = items def parse(self): # customized int/float constructor for Loader of in PyYAML # to regard all numbers as plain string def _no_number(self, node): return str(self.construct_scalar(node)) yaml.Loader.add_constructor(u'tag:yaml.org,2002:int', _no_number) yaml.Loader.add_constructor(u'tag:yaml.org,2002:float', _no_number) # loading data from YAML try: self.metadata.update(yaml.load(self.stream)) except yaml.scanner.ScannerError, e: logger.error('syntax error found in yaml: %s' % str(e)) except yaml.parser.ParserError, e: logger.error('syntax error found in yaml: %s' % str(e)) except ValueError: logger.error('Please check if the input file is in YAML format') except TypeError: # empty can lead here logger.error('Empty yaml file: %s' % self.yaml_fpath) # verifying the sanity self.sanity_check() # for convenience self.pkg = self.metadata['Name'] self.version = self.metadata['Version'] try: self.release = self.metadata['Release'] except KeyError: logger.warning('"Release" not specified, use "1" as the default value') self.release = self.metadata['Release'] = '1' if not self.specfile: self.specfile = "%s.spec" % self.pkg self.newspec = True if "RpmLintIgnore" in self.metadata: rpmlintrc = "%s-rpmlintrc" %self.metadata['Name'] rpmlint = "from Config import *\n" for lint in self.metadata['RpmLintIgnore']: rpmlint = rpmlint + "addFilter(\"%s\")\n" %lint file = open(rpmlintrc, "w") file.write(rpmlint) file.close() # handling 'ExtraSources', extra separated files which need to be install # specific paths if "ExtraSources" in self.metadata: # confirm 'Sources' valid if 'Sources' not in self.metadata: self.metadata['Sources'] = [] extra_srcs = [] extra_install = '' count = len(self.metadata['Sources']) for extra_src in self.metadata['ExtraSources']: try: file, path = map(str.strip, extra_src.split(';')) except: file = extra_src.strip() path = '' self.extras_filelist.append(os.path.join(path, file)) extra_srcs.append(file) if path: extra_install += "mkdir -p %%{buildroot}%s\n" % (path) extra_install += "cp -a %%{SOURCE%s} %%{buildroot}%s\n" % (count, path) count = count + 1 self.metadata['Sources'].extend(extra_srcs) self.metadata['ExtraInstall'] = extra_install if self.download_new: if not self.skip_scm: # update to SCM latest release if "SCM" in self.metadata: self._get_scm_latest_release() # if no srcpkg with yaml.version exists in cwd, trying to download if 'Sources' in self.metadata: self._download_sources() # handle patches with extra options if "Patches" in self.metadata: patches = self.metadata['Patches'] self.metadata['Patches'] = [] self.metadata['PatchOpts'] = [] for patch in patches: if isinstance(patch, str): self.metadata['Patches'].append(patch) self.metadata['PatchOpts'].append('-p1') elif isinstance(patch, dict): self.metadata['Patches'].append(patch.keys()[0]) self.metadata['PatchOpts'].append(patch.values()[0]) elif isinstance(patch, list): self.metadata['Patches'].append(patch[0]) self.metadata['PatchOpts'].append(' '.join(patch[1:])) # detect 'series.conf' in current dir if os.path.exists(SERIES_PATH): if "Patches" in self.metadata: logger.warning('Both "Patches" tag in yaml and series.conf exists, please use only one.') else: self.metadata['Patches'], self.metadata['PatchCmts'] = self._parse_series() if 'Sources' in self.metadata: self._analyze_source() # clean up all boolean type keys, use the exists status to present bool value self._cleanup_boolkeys(self.metadata) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: self._cleanup_boolkeys(sp) # check duplicate default configopts dup = '--disable-static' if 'ConfigOptions' in self.metadata and dup in self.metadata['ConfigOptions']: logger.warning('found duplicate configure options: "%s", please remove it' % dup) self.metadata['ConfigOptions'].remove(dup) if not self.metadata['ConfigOptions']: del self.metadata['ConfigOptions'] # check duplicate requires for base package if "SubPackages" in self.metadata: if 'Epoch' in self.metadata: autodep = "%{name} = %{epoch}:%{version}-%{release}" else: autodep = "%{name} = %{version}-%{release}" for sp in self.metadata["SubPackages"]: if 'Requires' in sp and autodep in sp['Requires'] and 'AutoDepend' in sp: logger.warning('found duplicate Requires for %s in sub-pkg:%s, please remove it' %(autodep, sp['Name'])) sp['Requires'].remove(autodep) if not sp['Requires']: del sp['Requires'] # initialize extra flags for subpkgs if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: self.extra['subpkgs'][sp['Name']] = copy.deepcopy(self.extra_per_pkg) if "AutoSubPackages" in self.metadata: for asp in self.metadata["AutoSubPackages"]: self.extra['subpkgs'][asp] = copy.deepcopy(self.extra_per_pkg) # detect the using UI widget, QT or Gtk2 all_pkgbr = [] if 'PkgBR' in self.metadata: all_pkgbr += self.metadata['PkgBR'] if 'PkgConfigBR' in self.metadata: all_pkgbr += self.metadata['PkgConfigBR'] for br in all_pkgbr: if br.startswith('Qt'): self.uiwidget = 'Qt' """ NOTE we need NOT to do the following checking: * whether auto-added Requires(include pre/post/preun/postun) duplicated They should be checked by users manually. """ def _lookup_pkgmeta(self, pkgname): if pkgname == 'main': return self.metadata for sp in self.metadata['SubPackages']: if sp['Name'] == pkgname: return sp # not found return {} def parse_files(self, files = {}, docs = {}): py_path_check = False if 'Builder' in self.metadata and self.metadata['Builder'] == 'python': py_path_check = True if 'BuildArch' in self.metadata and self.metadata['BuildArch'] == 'noarch': py_path = '%{python_sitelib}' else: py_path = '%{python_sitearch}' for pkg_name,v in files.iteritems(): pkg_meta = self._lookup_pkgmeta(pkg_name) if pkg_name == 'main': pkg_extra = self.extra else: pkg_extra = self.extra['subpkgs'][pkg_name] for l in v: if re.match('\s*%exclude\s.*', l): pass # not match anyting excluded files elif re.match('.*\.info\..*', l) or re.match('.*(usr/share/info|%{_infodir}).*info\..*$', l): p1 = re.compile('^%doc\s+(.*)') l1 = p1.sub(r'\1', l) pkg_extra['Infos'].append(l1) pkg_extra['Info'] = True elif re.match('.*(usr/share|%{_datadir})/applications/.*\.desktop$', l): if 'NoDesktop' not in self.metadata: pkg_extra['Desktop'] = True elif re.match('.*(/etc|%{_sysconfdir})/rc.d/init.d/.*', l) or \ re.match('.*(/etc|%{_sysconfdir})/init.d/.*', l) or \ re.match('.*%{_initddir}/.*', l) or \ re.match('.*%{_initrddir}/.*', l): pkg_extra['Service'] = True elif re.match('.*(%{_libdir}|%{_lib}|/lib|/usr/lib)/[^/]*[.*?]+so([.*?]+.*$|$)', l) or \ re.match('.*(/ld.so.conf.d/).*', l): if pkg_name != 'devel' and not pkg_name.endswith('-devel'): # 'devel' sub pkgs should not set Lib flags pkg_extra['Lib'] = True elif re.match('.*(%{_libdir}|%{_lib}).*', l) and re.match('.*\.a$', l): # if *.a found, set 'HasStatic' flag for MAIN pkg self.extra['HasStatic'] = True elif re.match('.*\.schema.*', l): comp = l.split() if len(comp) > 1: l = comp[1] pkg_extra['Schema'] = True pkg_extra['Schemas'].append(l) elif re.match('.*\/icons\/.*', l): if 'NoIconCache' in pkg_meta and pkg_meta['NoIconCache'] == True: # using "NoIconCache" to avoid cache explicitly continue if self.uiwidget and self.uiwidget == 'Qt': # disable icon files handling for Qt based app continue pkg_extra['Icon'] = True # special checking for python packages if py_path_check: if '%{python_sitelib}' in l or '%{python_sitearch}' in l: if py_path not in l: logger.error('please use %s in %%files to specify module installation path' % py_path) # check whether need to update desktop database if 'UpdateDesktopDB' in self.metadata: self.extra['DesktopDB'] = True if self.extra['Desktop'] != True: logger.warning('"UpdateDesktopDB" specified but found no desktop files') # files listed in '%doc' need handling # TODO to be cleanup for pkg_name,v in docs.iteritems(): if pkg_name == 'main': pkg_extra = self.extra else: pkg_extra = self.extra['subpkgs'][pkg_name] for l in v: for item in l.split(): if re.match('.*\.info.*', item) or \ re.match('.*(usr/share/info|%{_infodir}).*', item): pkg_extra['Info'] = True pkg_extra['Infos'].append(item) def parse_existing(self, spec_fpath): sin = re.compile("^# >> ([^\s]+)\s*(.*)") sout = re.compile("^# << ([^\s]+)\s*(.*)") version = None # temp vars recording = [] record = False files = {} install = {} build = {} macros = {} # global macros setup = {} pre = {} preun = {} post = {} postun = {} check = {} # extra headers line_num = 0 for i in file(spec_fpath): i = i.strip() if line_num < 3: if line_num == 2: m = re.match("^#.*spectacle version (\S+)$", i) if m: version = m.group(1) spec_ver = _V(version) cur_ver = _V(__version__.VERSION) if cur_ver < spec_ver: logger.warning('!!! Current spectacle version is lower than the one used for this package last time') answer = logger.ask('Please upgrade your spectacle firstly, continue?', False) if not answer: sys.exit(1) else: answer = logger.ask('The exist spec file might be not a spectacle generated one, continue?', False) if not answer: sys.exit(1) line_num += 1 matchin = sin.match(i) matchout = sout.match(i) if matchin and not record: record = True recording = [] continue if matchout: record = False if not recording: continue # empty if matchout.group(2) and matchout.group(1) in ["files", "post","postun", "pre", "preun"]: if not matchout.group(2) in self.extra['subpkgs']: logger.error('In spec %s section for %s package. Package does not excist in YAML.' % (matchout.group(1), matchout.group(2))) if matchout.group(1) == "files": if matchout.group(2): files[matchout.group(2)] = recording else: files['main'] = recording elif matchout.group(1) == "post": if matchout.group(2): post[matchout.group(2)] = recording else: post['main'] = recording elif matchout.group(1) == "postun": if matchout.group(2): postun[matchout.group(2)] = recording else: postun['main'] = recording elif matchout.group(1) == "pre": if matchout.group(2): pre[matchout.group(2)] = recording else: pre['main'] = recording elif matchout.group(1) == "preun": if matchout.group(2): preun[matchout.group(2)] = recording else: preun['main'] = recording elif matchout.group(1) == "install": install[matchout.group(2)] = recording elif matchout.group(1) == "build": build[matchout.group(2)] = recording elif matchout.group(1) == "macros": macros['main'] = recording elif matchout.group(1) == "setup": setup['main'] = recording elif matchout.group(1) == "check" or \ matchout.group(1) == "check_scriptlets": #TODO, remove it whenever cleanup check['main'] = recording if record: recording.append(i) content= { "files" : files, "install": install, "build" : build, } if macros: content["macros"] = macros if setup: content["setup"] = setup if post: content["post"] = post if postun: content["postun"] = postun if pre: content["pre"] = pre if preun: content["preun"] = preun if check and 'Check' in self.metadata: content["check"] = check # checking whether both 'Files' key and inline files exists if files: files_yaml = False if 'Files' in self.metadata and self.metadata['Files']: files_yaml = True elif 'SubPackages' in self.metadata: for spkg in self.metadata['SubPackages']: if 'Files' in spkg: files_yaml = True break if files_yaml: logger.warning('both "Files" YAML keyword and inline %file content in spec present') # try to remove duplicate '%defattr' in files list for key in content['files']: self._check_dup_files(content['files'][key]) # checking duplicate 'rm -rf %{buildroot}' re_cleanup = re.compile('^(?:rm|\%\{__rm\})\W+-rf\W+(?:\$RPM_BUILD_ROOT|\%\{buildroot\})/?$') if 'install' in content and 'post' in content['install']: if re_cleanup.match(content['install']['post'][0]): logger.warning('duplicate buildroot cleanup found in the first line of install_post, remove it') return content def process(self, extra_content): """ Read in old spec and record all customized stuff, And auto-detect extra infos from %files list """ # backup old spec file if needed if os.path.exists(self.specfile): if self.clean_old: # backup original file backdir = 'spec.backup' try: os.mkdir(backdir) except: pass bak_spec_fpath = os.path.join(backdir, self.specfile) if os.path.exists(bak_spec_fpath): answer = logger.ask('%s will be overwritten by the backup, continue?' % bak_spec_fpath) if not answer: sys.exit(1) logger.info('Old spec file is saved as "%s"' % bak_spec_fpath) os.rename(self.specfile, bak_spec_fpath) else: self.newspec = False specfile = self.specfile if not self.newspec: self.extra['content'] = self.parse_existing(specfile) if extra_content: self.extra['content'].update(extra_content) """ TODO: should not regard them as the content of MAIN pkg if self.extras_filelist: try: self.extra['content']['files']['main'].extend(self.extras_filelist) except KeyError: self.extra['content'].update({'files': {'main': self.extras_filelist}}) """ # TODO, cleanup docs handling when all pkgs need not, include spec.tmpl docs = {} if 'Documents' in self.metadata: docs['main'] = self.metadata['Documents'] if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if 'Documents' in sp: docs[sp['Name']] = sp['Documents'] if 'files' in self.extra['content']: files = copy.deepcopy(self.extra['content']['files']) else: files = {} if 'Files' in self.metadata: if 'main' in files: files['main'] += self.metadata['Files'] else: files['main'] = self.metadata['Files'] if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: if 'Files' in sp: if sp['Name'] in files: files[sp['Name']] += sp['Files'] else: files[sp['Name']] = sp['Files'] self.parse_files(files, docs) # adding automatic requires according %files self._gen_auto_requires(self.metadata, self.extra) if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: self._gen_auto_requires(sp, self.extra['subpkgs'][sp['Name']], sp['Name']) # check duplicate 'ldconfig' in %post/%postun # actually, all auto generated scripts in %post like sections should be checked # for duplicate issue, but it's not nice to do that according current design. # But for 'ldconfig', there're too many issues with it, the following code # is just a workaround to fix them. self._check_dup_ldconfig() if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: self._check_dup_ldconfig(sp['Name']) # check duplicate other auto-scriptlets in %post/%postun self._check_dup_scriptlets() if "SubPackages" in self.metadata: for sp in self.metadata["SubPackages"]: self._check_dup_scriptlets(sp['Name']) spec_content = spec.spec(searchList=[{ 'metadata': self.metadata, 'extra': self.extra, 'arch_split': arch_split }]).respond() file = open(specfile, "w") file.write(spec_content.encode('utf-8')) file.close() def generate_rpm(yaml_fpath, clean_old = False, extra_content = None, spec_fpath=None, download_new=True, skip_scm=False): rpm_writer = RPMWriter(yaml_fpath, spec_fpath, clean_old, download_new, skip_scm) rpm_writer.parse() rpm_writer.process(extra_content) return rpm_writer.specfile, rpm_writer.newspec spectacle-0.22/spectacle/vercmp.py000066400000000000000000000074441153164731700172320ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import re import string from types import StringType import distutils.version class FairVersion(distutils.version.LooseVersion): """ Version schemes based on LooseVersion in distutils.version, but with more comparison rules to meet the expect result. For instance, the 'git', 'rc', 'svn', 'beta' alphabetic components means "pre-release" tags, and other additional non-numberic identifiers means "post-release" tags. In the version comparison of the versions with extra tags, this rule will be applied: "pre-release" version < release version < "post-release" version e.g.: 1.1.0git < 1.1.0 < 1.1.1 < 1.1.1-meego It can hardly cover all the special cases, but if the version string can follow the packaging guideline of MeeGo, this class is useful enough. """ pre_tags = ('git', 'svn', 'cvs', 'alpha', 'a', 'beta', 'b', 'rc') def parse (self, vstring): self.vstring = vstring components = filter(lambda x: x and x != '.', self.component_re.split(vstring)) numbers = [] extras = [] for part in components: if not extras: try: numbers.append(int(part)) except ValueError: extras.append(part) else: extras.append(part) self.version = numbers self.extra_tags = extras def __repr__ (self): return "FairVersion ('%s')" % str(self) def __cmp__ (self, other): if isinstance(other, StringType): other = FairVersion(other) res = cmp(self.version, other.version) if res == 0: # need to consider the extra tags in if not self.extra_tags and not other.extra_tags: return 0 self_pre = None self_post = None oth_pre = None oth_post = None if self.extra_tags: if self.extra_tags[0] in self.pre_tags: self_pre = True else: self_post = True if other.extra_tags: if other.extra_tags[0] in self.pre_tags: oth_pre = True else: oth_post = True if (self_pre and oth_pre) or (self_post and oth_post): return cmp(self.extra_tags, other.extra_tags) elif self_pre and not oth_pre: return -1 elif oth_post: return -1 elif oth_pre or self_post: return 1 # must not reach here!! raise ValueError() else: return res if __name__ == '__main__': # test cases import pprint vers = ['1.1.0', '1.1', '1.0', '1.1git', '1.1-meego', '1.1.0git', '1.1.0meego1', '1.1.0meego2', '1.1.0.1', '1.1.1'] fvers = [FairVersion(v) for v in vers] fvers.sort() pprint.pprint(fvers) spectacle-0.22/tests/000077500000000000000000000000001153164731700145525ustar00rootroot00000000000000spectacle-0.22/tests/alltest.py000077500000000000000000000017561153164731700166100ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import unittest import test_specify def main(): suite = unittest.TestSuite(( test_specify.suite(), )) unittest.TextTestRunner(verbosity=2).run(suite) if __name__ == '__main__': main() spectacle-0.22/tests/cleanup.sh000077500000000000000000000001741153164731700165420ustar00rootroot00000000000000#!/bin/sh find . -name '*.pyc' -exec rm -f {} \; 2>/dev/null find . -name tmp-files -type d -exec rm -rf {} \; 2>/dev/null spectacle-0.22/tests/fixcase.sh000077500000000000000000000015421153164731700165350ustar00rootroot00000000000000#!/bin/sh if [ $# -lt 1 ]; then echo 'Usage fixcase.sh ' exit 1 fi CaseName=$1 cd test-${CaseName} || exit 0 cp ../base/testpkg.yaml . specify -N -n -o output.spec testpkg.yaml 1>output.1.o 2>output.2.o mv output.spec output.orig.spec patch < input.p specify -N -n -o output.spec testpkg.yaml 1>output.1 2>output.2 if [ -f output.spec ]; then diff -upN output.orig.spec output.spec > output.p if [ $? != 0 ]; then echo 'Output diff:' cat output.p else rm -f output.p fi else rm -f output.p touch output.no fi diff -upN output.1.o output.1 > output.1p if [ $? != 0 ]; then echo 'Stdout diff:' cat output.1p else rm -f output.1p fi diff -upN output.2.o output.2 > output.2p if [ $? != 0 ]; then echo 'Stderr diff:' cat output.2p else rm -f output.2p fi mkdir -p tmp-files mv -f *.yaml *.spec *.[12o] tmp-files spectacle-0.22/tests/gencase.sh000077500000000000000000000017021153164731700165160ustar00rootroot00000000000000#!/bin/sh if [ $# -lt 1 ]; then echo 'Usage gencase.sh ' exit 1 fi CaseName=$1 mkdir test-${CaseName} cd test-${CaseName} cp ../base/testpkg.yaml . specify -N -n -o output.spec testpkg.yaml 1>output.1.o 2>output.2.o vi testpkg.yaml diff -upN ../base/testpkg.yaml testpkg.yaml > input.p mv output.spec output.orig.spec specify -N -n -o output.spec testpkg.yaml 1>output.1 2>output.2 echo 'Input diff:' cat input.p if [ -f output.spec ]; then diff -upN output.orig.spec output.spec > output.p if [ $? != 0 ]; then echo 'Output diff:' cat output.p else rm -f output.p fi else rm -f output.p touch output.no fi diff -upN output.1.o output.1 > output.1p if [ $? != 0 ]; then echo 'Stdout diff:' cat output.1p else rm -f output.1p fi diff -upN output.2.o output.2 > output.2p if [ $? != 0 ]; then echo 'Stderr diff:' cat output.2p else rm -f output.2p fi mkdir tmp-files mv -f *.yaml *.spec *.[12o] tmp-files spectacle-0.22/tests/specify_cases/000077500000000000000000000000001153164731700173725ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/base/000077500000000000000000000000001153164731700203045ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/base/testpkg.yaml000066400000000000000000000011601153164731700226470ustar00rootroot00000000000000Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 Release: 1 Group: System/Base License: BSD URL: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". Configure: none Builder: none SubPackages: - Name: devel Summary: Development files for %{name} Group: Development/Libraries Description: This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-NonASCII_string/000077500000000000000000000000001153164731700232405ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-NonASCII_string/input.p000066400000000000000000000006071153164731700245630ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-23 11:14:51.021468437 +0800 @@ -11,6 +11,7 @@ Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". + Author: 丁建峰 Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-NonASCII_string/output.p000066400000000000000000000005401153164731700247600ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:13:30.382083701 +0800 +++ output.spec 2010-07-23 11:14:51.172407798 +0800 @@ -20,6 +20,7 @@ Source100: testpkg.yaml Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +Author: 丁建峰 spectacle-0.22/tests/specify_cases/test-autolocale_intltool/000077500000000000000000000000001153164731700244235ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-autolocale_intltool/input.p000066400000000000000000000003601153164731700257420ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-18 16:07:06.000000000 +0800 @@ -14,6 +14,8 @@ Description: | Configure: none Builder: none +PkgBR: + - intltool SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-autolocale_intltool/output.p000066400000000000000000000011311153164731700261400ustar00rootroot00000000000000--- output.orig.spec 2010-03-18 16:06:56.000000000 +0800 +++ output.spec 2010-03-18 16:07:07.000000000 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: intltool %description Sample package for spectacle testings, which will be used as @@ -52,6 +53,7 @@ rm -rf %{buildroot} # >> install post # << install post +%find_lang testpkg @@ -59,7 +61,7 @@ rm -rf %{buildroot} -%files +%files -f testpkg.lang %defattr(-,root,root,-) # >> files # << files spectacle-0.22/tests/specify_cases/test-builder_cmake/000077500000000000000000000000001153164731700231355ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_cmake/input.p000066400000000000000000000005411153164731700244550ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-23 11:16:29.493919869 +0800 @@ -12,8 +12,7 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Builder: cmake SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_cmake/output.p000066400000000000000000000007611153164731700246620ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:15:58.432688797 +0800 +++ output.spec 2010-07-23 11:16:29.632109944 +0800 @@ -42,7 +42,10 @@ This package contains development files # >> build pre # << build pre - +mkdir meego-build +cd meego-build +cmake .. +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +53,8 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +cd meego-build +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_default/000077500000000000000000000000001153164731700235015ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_default/input.p000066400000000000000000000004131153164731700250170ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:37:30.000000000 +0800 @@ -13,7 +13,6 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_default/output.p000066400000000000000000000006421153164731700252240ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:39:53.000000000 +0800 +++ output.spec 2010-06-21 16:39:53.000000000 +0800 @@ -43,6 +43,7 @@ This package contains development files # << build pre +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +51,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_perl/000077500000000000000000000000001153164731700230175ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_perl/input.p000066400000000000000000000004321153164731700243360ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:39:12.000000000 +0800 @@ -13,7 +13,7 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none +Builder: perl SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_perl/output.p000066400000000000000000000023071153164731700245420ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:02.000000000 +0800 +++ output.spec 2010-03-17 21:15:02.000000000 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description Sample package for spectacle testings, which will be used as @@ -41,7 +42,13 @@ This package contains development files # >> build pre # << build pre - +if test -f Makefile.PL; then +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?jobs:-j%jobs} +else +%{__perl} Build.PL --installdirs vendor +./Build +fi # >> build post # << build post @@ -49,6 +56,15 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +if test -f Makefile.PL; then +make pure_install PERL_INSTALL_ROOT=%{buildroot} +else +./Build install --installdirs vendor +fi +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' +find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';' +%{_fixperms} %{buildroot}/* # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_python/000077500000000000000000000000001153164731700233765ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_python/input.p000066400000000000000000000004341153164731700247170ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:39:01.000000000 +0800 @@ -13,7 +13,7 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none +Builder: python SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_python/output.p000066400000000000000000000014061153164731700251200ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:03.000000000 +0800 +++ output.spec 2010-03-17 21:15:03.000000000 +0800 @@ -5,6 +5,7 @@ # >> macros # << macros +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 @@ -41,7 +42,7 @@ This package contains development files # >> build pre # << build pre - +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build # >> build post # << build post @@ -49,6 +50,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%{__python} setup.py install --root=%{buildroot} -O1 # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_qmake/000077500000000000000000000000001153164731700231535ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_qmake/input.p000066400000000000000000000004331153164731700244730ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:59:17.000000000 +0800 @@ -13,7 +13,7 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none +Builder: qmake SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_qmake/output.p000066400000000000000000000006721153164731700247010ustar00rootroot00000000000000--- output.orig.spec 2010-09-17 10:54:29.816399316 +0800 +++ output.spec 2010-09-17 10:54:32.033206436 +0800 @@ -42,7 +42,9 @@ This package contains development files # >> build pre # << build pre +%qmake +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +52,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%qmake_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_qmake_multidistros/000077500000000000000000000000001153164731700257755ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_qmake_multidistros/input.p000066400000000000000000000005731153164731700273220ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-09-07 11:40:02.000000000 +0800 +++ testpkg.yaml 2010-09-14 16:16:34.549150340 +0800 @@ -12,8 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Builder: qmake +SupportOtherDistros: yes SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_qmake_multidistros/output.p000066400000000000000000000017621153164731700275240ustar00rootroot00000000000000--- output.orig.spec 2010-09-18 20:50:23.304270706 +0800 +++ output.spec 2010-09-18 20:50:23.405208362 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -42,14 +43,31 @@ This package contains development files # >> build pre # << build pre +%if 0%{?moblin_version} +%qmake +%else +qmake -makefile -nocache \ + "QMAKE_CFLAGS_RELEASE=${CFLAGS:-%optflags}" \ + "QMAKE_CFLAGS_DEBUG=${CFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS:-%optflags}" \ + QMAKE_STRIP=: \ + PREFIX=%{_prefix} +%endif +make %{?jobs:-j%jobs} # >> build post # << build post %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT # >> install pre # << install pre +%if 0%{?moblin_version} +%qmake_install +%else +%makeinstall +%endif # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_single_make/000077500000000000000000000000001153164731700243335ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_single_make/input.p000066400000000000000000000005751153164731700256620ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:38:36.000000000 +0800 @@ -12,8 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +Builder: single-make SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_single_make/output.p000066400000000000000000000006761153164731700260650ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:42:01.000000000 +0800 +++ output.spec 2010-06-21 16:42:01.000000000 +0800 @@ -42,7 +42,8 @@ This package contains development files # >> build pre # << build pre - +%configure --disable-static +make # >> build post # << build post @@ -50,6 +51,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-builder_without_configure/000077500000000000000000000000001153164731700256215ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-builder_without_configure/input.p000066400000000000000000000004321153164731700271400ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:37:57.000000000 +0800 @@ -13,7 +13,7 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none +Builder: make SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-builder_without_configure/output.p000066400000000000000000000006421153164731700273440ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:40:59.000000000 +0800 +++ output.spec 2010-06-21 16:40:59.000000000 +0800 @@ -43,6 +43,7 @@ This package contains development files # << build pre +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +51,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-checking_dropped_keys/000077500000000000000000000000001153164731700246725ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_dropped_keys/input.p000066400000000000000000000004461153164731700262160ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-15 15:47:50.000000000 +0800 @@ -14,6 +14,11 @@ Description: | Configure: none Builder: none +Documents: + - README + - DOC +PostScripts: | + # scripts in %post SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_dropped_keys/output.2p000066400000000000000000000006551153164731700265030ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:04.000000000 +0800 +++ output.2 2010-03-17 21:15:05.000000000 +0800 @@ -1,2 +1,4 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Deprecated key: PostScripts found, please use other valid keys +Warning: Deprecated key: Documents found, please use other valid keys Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_dropped_keys/output.p000066400000000000000000000003471153164731700264170ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:04.000000000 +0800 +++ output.spec 2010-03-17 21:15:05.000000000 +0800 @@ -61,6 +61,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%doc README +%doc DOC # >> files # << files spectacle-0.22/tests/specify_cases/test-checking_empty_keys/000077500000000000000000000000001153164731700243735ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_empty_keys/input.p000066400000000000000000000006551153164731700257210ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-17 21:34:05.000000000 +0800 @@ -4,7 +4,7 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD -URL: http://www.testpkg.org/ +URL: Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz Description: | @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +Patches: +Check: + SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_empty_keys/output.2p000066400000000000000000000005341153164731700262000ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:33:41.000000000 +0800 +++ output.2 2010-03-17 21:34:05.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Please remove empty keys in main package: Patches, URL, Check Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_empty_keys/output.p000066400000000000000000000005071153164731700261160ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:33:41.000000000 +0800 +++ output.spec 2010-03-17 21:34:05.000000000 +0800 @@ -11,7 +11,6 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD -URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml spectacle-0.22/tests/specify_cases/test-checking_ignored_configure/000077500000000000000000000000001153164731700256725ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_ignored_configure/input.p000066400000000000000000000005701153164731700272140ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-23 11:18:54.291407470 +0800 @@ -12,8 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +Builder: python SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_ignored_configure/output.2p000066400000000000000000000006051153164731700274760ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:18:42.942304765 +0800 +++ output.2 2010-07-23 11:18:54.444732273 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "python" need no "Configure" setting which will be ignored Warning: NEW spec file created: output.spec, maybe customized spec content is needed! spectacle-0.22/tests/specify_cases/test-checking_ignored_configure/output.p000066400000000000000000000014061153164731700274140ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:18:42.942304765 +0800 +++ output.spec 2010-07-23 11:18:54.444732273 +0800 @@ -5,6 +5,7 @@ # >> macros # << macros +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 @@ -42,7 +43,7 @@ This package contains development files # >> build pre # << build pre - +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build # >> build post # << build post @@ -50,6 +51,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%{__python} setup.py install --root=%{buildroot} -O1 # >> install post # << install post spectacle-0.22/tests/specify_cases/test-checking_invalid_archnamespace/000077500000000000000000000000001153164731700265025ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_invalid_archnamespace/input.p000066400000000000000000000006661153164731700300320ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:18:27.000000000 +0800 @@ -11,6 +11,11 @@ Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +Requires: + - ppc:ppc-pkg + +PkgBR: + - sparc:sparc-pkg-devel Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-checking_invalid_archnamespace/output.2p000066400000000000000000000006701153164731700303100ustar00rootroot00000000000000--- output.2.o 2010-12-09 11:34:14.525023916 +0800 +++ output.2 2010-12-09 11:34:14.645023854 +0800 @@ -1,2 +1,4 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: unsupport arch namespace: ppc in key Requires +Warning: unsupport arch namespace: sparc in key PkgBR Warning: NEW spec file created: output.spec, maybe customized spec content is needed! spectacle-0.22/tests/specify_cases/test-checking_invalid_archnamespace/output.p000066400000000000000000000006011153164731700302200ustar00rootroot00000000000000--- output.orig.spec 2010-12-09 11:34:14.525023916 +0800 +++ output.spec 2010-12-09 11:34:14.645023854 +0800 @@ -14,6 +14,12 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +%ifarch ppc +Requires: ppc-pkg +%endif +%ifarch sparc +BuildRequires: sparc-pkg-devel +%endif %description spectacle-0.22/tests/specify_cases/test-checking_invalid_cfgr_builder/000077500000000000000000000000001153164731700263375ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_invalid_cfgr_builder/input.p000066400000000000000000000005571153164731700276660ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-07 09:41:50.525421578 +0800 @@ -12,8 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: abc +Builder: xyz SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_invalid_cfgr_builder/output.2p000066400000000000000000000007321153164731700301440ustar00rootroot00000000000000--- output.2.o 2010-07-07 09:41:40.916096869 +0800 +++ output.2 2010-07-07 09:41:50.749043384 +0800 @@ -1,2 +1,4 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "abc" is not a valid choice of Configure(configure/reconfigure/autogen/cmake/none) +Warning: "xyz" is not a valid choice of Builder(make/single-make/python/perl/qmake/cmake/none) Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_invalid_cfgr_builder/output.p000066400000000000000000000003451153164731700300620ustar00rootroot00000000000000--- output.orig.spec 2010-07-07 09:41:40.916096869 +0800 +++ output.spec 2010-07-07 09:41:50.749043384 +0800 @@ -43,6 +43,7 @@ This package contains development files # << build pre +xyz # >> build post # << build post spectacle-0.22/tests/specify_cases/test-checking_invalid_keys/000077500000000000000000000000001153164731700246635ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_invalid_keys/input.p000066400000000000000000000004761153164731700262120ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:53:29.000000000 +0800 @@ -5,6 +5,7 @@ Release: 1 Group: System/Base License: BSD URL: http://www.testpkg.org/ +xURL: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz Description: | spectacle-0.22/tests/specify_cases/test-checking_invalid_keys/output.2p000066400000000000000000000004721153164731700264710ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:08.000000000 +0800 +++ output.2 2010-03-17 21:15:08.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Unexpected keys found: xURL Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_mandatory_keys/000077500000000000000000000000001153164731700252335ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_mandatory_keys/input.p000066400000000000000000000003751153164731700265600ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:55:04.000000000 +0800 @@ -1,6 +1,5 @@ Name: testpkg Summary: Sample package for spectacle testings -Version: 1.0 Release: 1 Group: System/Base License: BSD spectacle-0.22/tests/specify_cases/test-checking_mandatory_keys/output.2p000066400000000000000000000005711153164731700270410ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:05:31.354224575 +0800 +++ output.2 2010-07-23 11:05:31.497763030 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Error: Missing mandatory keys for main package: Version spectacle-0.22/tests/specify_cases/test-checking_mandatory_keys/output.no000066400000000000000000000000001153164731700271170ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_missing_description/000077500000000000000000000000001153164731700262565ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_missing_description/input.p000066400000000000000000000012541153164731700276000ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:33:38.000000000 +0800 @@ -7,11 +7,6 @@ License: BSD URL: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz -Description: | - Sample package for spectacle testings, which will be used as - the base of all testings. In this YAML file, only basic keywords - specified, plus with one sub package "devel". - Configure: none Builder: none @@ -19,4 +14,3 @@ SubPackages: - Name: devel Summary: Development files for %{name} Group: Development/Libraries - Description: This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-checking_missing_description/output.2p000066400000000000000000000005751153164731700300700ustar00rootroot00000000000000--- output.2.o 2011-02-22 11:51:57.391960705 +0800 +++ output.2 2011-02-22 11:51:57.503960404 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Error: Missing mandatory keys for main package: Description spectacle-0.22/tests/specify_cases/test-checking_nosetup/000077500000000000000000000000001153164731700236775ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_nosetup/input.p000066400000000000000000000005551153164731700252240ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-31 17:19:48.000000000 +0800 @@ -12,6 +12,10 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +NoSetup: yes +SetupOptions: -q -n xyz +SourcePrefix: xyz + Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-checking_nosetup/output.2p000066400000000000000000000006711153164731700255060ustar00rootroot00000000000000--- output.2.o 2010-03-31 17:19:13.000000000 +0800 +++ output.2 2010-03-31 17:19:48.000000000 +0800 @@ -1,2 +1,4 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "SetupOptions" will have NO effect when "NoSetup" specified in YAML +Warning: "SourcePrefix" will have NO effect when "NoSetup" specified in YAML Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_nosetup/output.p000066400000000000000000000003721153164731700254220ustar00rootroot00000000000000--- output.orig.spec 2010-03-31 17:19:13.000000000 +0800 +++ output.spec 2010-03-31 17:19:48.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n %{name}-%{version} +# No setup # >> setup # << setup spectacle-0.22/tests/specify_cases/test-checking_pkgconfigbr_proposals/000077500000000000000000000000001153164731700265775ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_pkgconfigbr_proposals/input.p000066400000000000000000000005141153164731700301170ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:02:15.000000000 +0800 @@ -12,6 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +PkgBR: + - libX11-devel Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-checking_pkgconfigbr_proposals/output.2p000066400000000000000000000007161153164731700304060ustar00rootroot00000000000000--- output.2.o 2011-02-22 11:14:58.314960674 +0800 +++ output.2 2011-02-22 11:14:58.433960720 +0800 @@ -1,2 +1,6 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Please use one of the followings: + - x11 + - x11-xcb + in PkgConfigBR instead of libX11-devel in PkgBR Warning: NEW spec file created: output.spec, maybe customized spec content is needed! spectacle-0.22/tests/specify_cases/test-checking_pkgconfigbr_proposals/output.p000066400000000000000000000004741153164731700303250ustar00rootroot00000000000000--- output.orig.spec 2011-02-22 11:14:58.314960674 +0800 +++ output.spec 2011-02-22 11:14:58.433960720 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: libX11-devel %description spectacle-0.22/tests/specify_cases/test-checking_problem_groups/000077500000000000000000000000001153164731700252415ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_problem_groups/input.p000066400000000000000000000004741153164731700265660ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:35:25.000000000 +0800 @@ -2,7 +2,7 @@ Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 Release: 1 -Group: System/Base +Group: System XYZ/Base License: BSD URL: http://www.testpkg.org/ Sources: spectacle-0.22/tests/specify_cases/test-checking_problem_groups/output.2p000066400000000000000000000006241153164731700270460ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:16.000000000 +0800 +++ output.2 2010-03-17 21:15:17.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Group 'System XYZ/Base' is not in the list of approved groups. See /usr/share/spectacle/GROUPS for the complete list. Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_problem_groups/output.p000066400000000000000000000006161153164731700267650ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:16.000000000 +0800 +++ output.spec 2010-03-17 21:15:17.000000000 +0800 @@ -9,7 +9,7 @@ Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 Release: 1 -Group: System/Base +Group: System XYZ/Base License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz spectacle-0.22/tests/specify_cases/test-checking_renamed_keys/000077500000000000000000000000001153164731700246505ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_renamed_keys/input.p000066400000000000000000000003571153164731700261750ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 23:12:48.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +NeedCheckSection: yes SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_renamed_keys/output.2p000066400000000000000000000005341153164731700264550ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:17.000000000 +0800 +++ output.2 2010-03-17 21:15:17.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: Renamed key: NeedCheckSection found, please use Check instead Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_renamed_keys/output.p000066400000000000000000000003561153164731700263750ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:17.000000000 +0800 +++ output.spec 2010-03-17 21:15:17.000000000 +0800 @@ -52,6 +52,10 @@ rm -rf %{buildroot} # >> install post # << install post +%check +# >> check +make check +# << check spectacle-0.22/tests/specify_cases/test-checking_setupoptions/000077500000000000000000000000001153164731700247565ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_setupoptions/input.p000066400000000000000000000005361153164731700263020ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-31 17:20:07.000000000 +0800 @@ -12,6 +12,9 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +SetupOptions: -q -n xyz +SourcePrefix: xyz + Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-checking_setupoptions/output.2p000066400000000000000000000005471153164731700265670ustar00rootroot00000000000000--- output.2.o 2010-03-31 17:20:00.000000000 +0800 +++ output.2 2010-03-31 17:20:07.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "SourcePrefix" will have NO effect when "SetupOptions" specified in YAML Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-checking_setupoptions/output.p000066400000000000000000000004001153164731700264710ustar00rootroot00000000000000--- output.orig.spec 2010-03-31 17:20:00.000000000 +0800 +++ output.spec 2010-03-31 17:20:07.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n %{name}-%{version} +%setup -q -n xyz # >> setup # << setup spectacle-0.22/tests/specify_cases/test-checking_typo_pkgbr/000077500000000000000000000000001153164731700243625ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_typo_pkgbr/input.p000066400000000000000000000004411153164731700257010ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-23 11:20:04.151422059 +0800 @@ -15,6 +15,9 @@ Description: | Configure: none Builder: none +BuildRequires: + - abc + SubPackages: - Name: devel Summary: Development files for %{name} spectacle-0.22/tests/specify_cases/test-checking_typo_pkgbr/output.2p000066400000000000000000000006251153164731700261700ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:19:53.071923257 +0800 +++ output.2 2010-07-23 11:20:04.294144735 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "BuildRequires" might be a typo of PkgBR or PkgConfigBR, please correct it Warning: NEW spec file created: output.spec, maybe customized spec content is needed! spectacle-0.22/tests/specify_cases/test-checking_typo_url/000077500000000000000000000000001153164731700240575ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_typo_url/input.p000066400000000000000000000005131153164731700253760ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-23 11:20:13.561442739 +0800 @@ -4,7 +4,7 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD -URL: http://www.testpkg.org/ +Url: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz Description: | spectacle-0.22/tests/specify_cases/test-checking_typo_url/output.2p000066400000000000000000000005721153164731700256660ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:20:09.561943883 +0800 +++ output.2 2010-07-23 11:20:13.714971828 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: "Url" might be a typo of URL, please correct it Warning: NEW spec file created: output.spec, maybe customized spec content is needed! spectacle-0.22/tests/specify_cases/test-checking_typo_url/output.p000066400000000000000000000005071153164731700256020ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:20:09.561943883 +0800 +++ output.spec 2010-07-23 11:20:13.705396425 +0800 @@ -11,7 +11,6 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD -URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath/000077500000000000000000000000001153164731700255625ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath/input.p000066400000000000000000000006361153164731700271070ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-05-18 20:03:30.000000000 +0800 @@ -12,8 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Builder: python +BuildArch: noarch + +Files: + - "%{python_sitearch}/*" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath/output.2p000066400000000000000000000006231153164731700273660ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:05:50.835751410 +0800 +++ output.2 2010-07-23 11:05:50.997754756 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Error: please use %{python_sitelib} in %files to specify module installation path spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath/output.no000066400000000000000000000000001153164731700274460ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath2/000077500000000000000000000000001153164731700256445ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath2/input.p000066400000000000000000000006121153164731700271630ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-05-18 20:04:17.000000000 +0800 @@ -12,8 +12,10 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Builder: python + +Files: + - "%{python_sitelib}/*" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath2/output.2p000066400000000000000000000006241153164731700274510ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:05:55.854043812 +0800 +++ output.2 2010-07-23 11:05:56.016273146 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Error: please use %{python_sitearch} in %files to specify module installation path spectacle-0.22/tests/specify_cases/test-checking_wrong_py_modpath2/output.no000066400000000000000000000000001153164731700275300ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_wrong_types/000077500000000000000000000000001153164731700245625ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-checking_wrong_types/input.p000066400000000000000000000010611153164731700261000ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:10:55.000000000 +0800 @@ -3,10 +3,10 @@ Summary: Sample package for spectacle te Version: 1.0 Release: 1 Group: System/Base -License: BSD +License: + - BSD URL: http://www.testpkg.org/ -Sources: - - http://www.testpkg.org/testpkg-%{version}.tar.gz +Sources: http://www.testpkg.org/testpkg-%{version}.tar.gz Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords spectacle-0.22/tests/specify_cases/test-checking_wrong_types/output.2p000066400000000000000000000006651153164731700263740ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:19.000000000 +0800 +++ output.2 2010-03-17 21:15:19.000000000 +0800 @@ -1,2 +1,4 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: the value of "Sources" in main package is expected as list typed +Warning: the value of "License" in main package is expected as string typed Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-duplicate_autoreqs/000077500000000000000000000000001153164731700242445ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-duplicate_autoreqs/input.p000066400000000000000000000004701153164731700255650ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 19:58:43.000000000 +0800 @@ -14,6 +14,10 @@ Description: | Configure: none Builder: none +RequiresPost: /sbin/ldconfig +RequiresPostUn: /sbin/ldconfig +Files: + - "%{_libdir}/*.so" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-duplicate_autoreqs/output.2p000066400000000000000000000011471153164731700260520ustar00rootroot00000000000000--- output.2.o 2010-03-30 19:58:04.000000000 +0800 +++ output.2 2010-03-30 19:58:43.000000000 +0800 @@ -1,2 +1,6 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: the value of "RequiresPost" in main package is expected as list typed +Warning: the value of "RequiresPostUn" in main package is expected as list typed +Warning: duplicate item: /sbin/ldconfig for RequiresPostUn in package main +Warning: duplicate item: /sbin/ldconfig for RequiresPost in package main Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-duplicate_autoreqs/output.p000066400000000000000000000011701153164731700257640ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 19:58:04.000000000 +0800 +++ output.spec 2010-03-30 19:58:43.000000000 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description Sample package for spectacle testings, which will be used as @@ -55,7 +57,9 @@ rm -rf %{buildroot} +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig @@ -63,6 +67,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_libdir}/*.so # >> files # << files spectacle-0.22/tests/specify_cases/test-duplicate_cfg_opts/000077500000000000000000000000001153164731700242055ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-duplicate_cfg_opts/input.p000066400000000000000000000006611153164731700255300ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:54:59.000000000 +0800 @@ -12,8 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +ConfigOptions: + - --disable-static + - --otheropt +Builder: make SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-duplicate_cfg_opts/output.2p000066400000000000000000000005461153164731700260150ustar00rootroot00000000000000--- output.2.o 2010-06-21 16:41:52.000000000 +0800 +++ output.2 2010-06-21 16:41:52.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: found duplicate configure options: "--disable-static", please remove it Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-duplicate_cfg_opts/output.p000066400000000000000000000007421153164731700257310ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:41:52.000000000 +0800 +++ output.spec 2010-06-21 16:41:52.000000000 +0800 @@ -42,7 +42,10 @@ This package contains development files # >> build pre # << build pre +%configure --disable-static \ + --otheropt +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +53,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-duplicate_files_attr/000077500000000000000000000000001153164731700245355ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-duplicate_files_attr/input.p000066400000000000000000000004271153164731700260600ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 16:06:04.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +Files: + - "%defattr(-,root,root,-)" + - "%{_bindir}/*" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-duplicate_files_attr/output.2p000066400000000000000000000005371153164731700263450ustar00rootroot00000000000000--- output.2.o 2010-03-24 17:39:14.000000000 +0800 +++ output.2 2010-03-24 17:39:14.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: found duplicate "%defattr(-,root,root,-)" in file list, removed! Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-duplicate_files_attr/output.p000066400000000000000000000003361153164731700262600ustar00rootroot00000000000000--- output.orig.spec 2010-03-24 17:39:14.000000000 +0800 +++ output.spec 2010-03-24 17:39:14.000000000 +0800 @@ -61,6 +61,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_bindir}/* # >> files # << files spectacle-0.22/tests/specify_cases/test-duplicate_files_attr2/000077500000000000000000000000001153164731700246175ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-duplicate_files_attr2/input.p000066400000000000000000000025001153164731700261340ustar00rootroot00000000000000--- /dev/null 2010-03-14 16:00:00.000000000 +0800 +++ output.spec 2010-03-14 16:21:19.000000000 +0800 @@ -0,0 +1,74 @@ +# +# Do not Edit! Generated by: +# spectacle version 0.13 +# +# >> macros +# << macros + +Name: testpkg +Summary: Sample package for spectacle testings +Version: 1.0 +Release: 1 +Group: System/Base +License: BSD +URL: http://www.testpkg.org/ +Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz +Source100: testpkg.yaml + +%description +Sample package for spectacle testings, which will be used as +the base of all testings. In this YAML file, only basic keywords +specified, plus with one sub package "devel". + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + + + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre + +# >> install post +# << install post + + + + + + + +%files +%defattr(-,root,root,-) +# >> files +%defattr(-,root,root,-) +%{_bindir}/* +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +# << files devel + spectacle-0.22/tests/specify_cases/test-duplicate_files_attr2/output.2p000066400000000000000000000007121153164731700264220ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:06:24.803312647 +0800 +++ output.2 2010-07-23 11:06:24.961431494 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Warning: found duplicate "%defattr(-,root,root,-)" in file list, removed! +Info: Old spec file exists, patching output.spec ... spectacle-0.22/tests/specify_cases/test-duplicate_files_attr2/output.p000066400000000000000000000003361153164731700263420ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:06:24.794056323 +0800 +++ output.spec 2010-07-23 11:06:24.961431494 +0800 @@ -65,6 +65,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) # >> files +%{_bindir}/* # << files spectacle-0.22/tests/specify_cases/test-duplicate_subpkg_reqs/000077500000000000000000000000001153164731700247265ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-duplicate_subpkg_reqs/input.p000066400000000000000000000006011153164731700262430ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:57:04.000000000 +0800 @@ -19,4 +19,6 @@ SubPackages: - Name: devel Summary: Development files for %{name} Group: Development/Libraries + Requires: + - "%{name} = %{version}-%{release}" Description: This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-duplicate_subpkg_reqs/output.2p000066400000000000000000000005761153164731700265410ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:06.000000000 +0800 +++ output.2 2010-03-17 21:15:06.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: found duplicate Requires for %{name} = %{version}-%{release} in sub-pkg:devel, please remove it Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-filesparsing_desktop/000077500000000000000000000000001153164731700245665ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-filesparsing_desktop/input.p000066400000000000000000000004141153164731700261050ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:56:33.000000000 +0800 @@ -14,6 +14,8 @@ Description: | Configure: none Builder: none +Files: + - "%{_datadir}/applications/*.desktop" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-filesparsing_desktop/output.p000066400000000000000000000012741153164731700263130ustar00rootroot00000000000000--- output.orig.spec 2010-05-16 18:59:32.000000000 +0800 +++ output.spec 2010-05-16 18:59:32.000000000 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: desktop-file-utils %description @@ -53,6 +54,9 @@ rm -rf %{buildroot} # >> install post # << install post +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/*.desktop @@ -64,6 +68,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_datadir}/applications/*.desktop # >> files # << files spectacle-0.22/tests/specify_cases/test-filesparsing_info/000077500000000000000000000000001153164731700240505ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-filesparsing_info/input.p000066400000000000000000000003771153164731700253770ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:49:28.000000000 +0800 @@ -14,6 +14,8 @@ Description: | Configure: none Builder: none +Files: + - "%{_infodir}/*.info.gz" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-filesparsing_info/output.p000066400000000000000000000013711153164731700255730ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 19:56:39.000000000 +0800 +++ output.spec 2010-03-30 19:56:39.000000000 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires(post): /sbin/install-info +Requires(postun): /sbin/install-info %description Sample package for spectacle testings, which will be used as @@ -55,7 +57,13 @@ rm -rf %{buildroot} +%post +%install_info --info-dir=%_infodir %{_infodir}/*.info.gz +%postun +if [ $1 = 0 ] ;then +%install_info_delete --info-dir=%{_infodir} %{_infodir}/*.info.gz +fi @@ -63,6 +71,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_infodir}/*.info.gz # >> files # << files spectacle-0.22/tests/specify_cases/test-filesparsing_preserve_versioned_ones/000077500000000000000000000000001153164731700300525ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-filesparsing_preserve_versioned_ones/input.p000066400000000000000000000004451153164731700313750ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 20:01:22.000000000 +0800 @@ -14,6 +14,11 @@ Description: | Configure: none Builder: none +RequiresPost: + - GConf2 >= 0.14 + +Files: + - "%{_libdir}/*.schema" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-filesparsing_preserve_versioned_ones/output.p000066400000000000000000000022311153164731700315710ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 19:59:59.000000000 +0800 +++ output.spec 2010-03-30 20:01:23.000000000 +0800 @@ -14,6 +14,9 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires(pre): GConf2 +Requires(preun): GConf2 +Requires(post): GConf2 >= 0.14 %description Sample package for spectacle testings, which will be used as @@ -53,8 +56,26 @@ rm -rf %{buildroot} # >> install post # << install post - - +%pre +if [ "$1" -gt 1 ]; then + export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` + gconftool-2 --makefile-uninstall-rule \ + %{_libdir}/*.schema \ + > /dev/null || : +fi + +%preun +if [ "$1" -eq 0 ]; then + export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` + gconftool-2 --makefile-uninstall-rule \ + %{_libdir}/*.schema \ + > /dev/null || : +fi + +%post +export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` +gconftool-2 --makefile-install-rule \ + %{_libdir}/*.schema > /dev/null || : @@ -63,6 +84,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_libdir}/*.schema # >> files # << files spectacle-0.22/tests/specify_cases/test-filesparsing_sharelib/000077500000000000000000000000001153164731700247065ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-filesparsing_sharelib/input.p000066400000000000000000000003711153164731700262270ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:55:13.000000000 +0800 @@ -14,6 +14,8 @@ Description: | Configure: none Builder: none +Files: + - "%{_libdir}/*.so" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-filesparsing_sharelib/output.p000066400000000000000000000011701153164731700264260ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 19:56:43.000000000 +0800 +++ output.spec 2010-03-30 19:56:43.000000000 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description Sample package for spectacle testings, which will be used as @@ -55,7 +57,9 @@ rm -rf %{buildroot} +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig @@ -63,6 +67,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_libdir}/*.so # >> files # << files spectacle-0.22/tests/specify_cases/test-filesparsing_staticlib/000077500000000000000000000000001153164731700250735ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-filesparsing_staticlib/input.p000066400000000000000000000006271153164731700264200ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:35:14.000000000 +0800 @@ -12,8 +12,10 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +Builder: make +Files: + - "%{_libdir}/*.a" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-filesparsing_staticlib/output.p000066400000000000000000000013001153164731700266060ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:41:15.000000000 +0800 +++ output.spec 2010-06-21 16:41:15.000000000 +0800 @@ -4,6 +4,7 @@ # # >> macros # << macros +%define keepstatic 1 Name: testpkg Summary: Sample package for spectacle testings @@ -42,7 +43,8 @@ This package contains development files # >> build pre # << build pre - +%configure +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +52,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post @@ -64,6 +67,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_libdir}/*.a # >> files # << files spectacle-0.22/tests/specify_cases/test-key_aswholename/000077500000000000000000000000001153164731700235225ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_aswholename/input.p000066400000000000000000000006211153164731700250410ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-15 16:21:22.000000000 +0800 @@ -16,7 +16,8 @@ Configure: none Builder: none SubPackages: - - Name: devel + - Name: haha-devel + AsWholeName: yes Summary: Development files for %{name} Group: Development/Libraries Description: This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-key_aswholename/output.p000066400000000000000000000012061153164731700252420ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:08.000000000 +0800 +++ output.spec 2010-03-17 21:15:09.000000000 +0800 @@ -22,12 +22,12 @@ specified, plus with one sub package "de -%package devel +%package -n haha-devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -%description devel +%description -n haha-devel This package contains development files for %{name}. @@ -65,8 +65,8 @@ rm -rf %{buildroot} # << files -%files devel +%files -n haha-devel %defattr(-,root,root,-) -# >> files devel -# << files devel +# >> files haha-devel +# << files haha-devel spectacle-0.22/tests/specify_cases/test-key_autodepend/000077500000000000000000000000001153164731700233475ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_autodepend/input.p000066400000000000000000000005461153164731700246740ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-15 16:15:18.000000000 +0800 @@ -17,6 +17,7 @@ Builder: none SubPackages: - Name: devel + AutoDepend: no Summary: Development files for %{name} Group: Development/Libraries Description: This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-key_autodepend/output.p000066400000000000000000000005771153164731700251010ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:09.000000000 +0800 +++ output.spec 2010-03-17 21:15:09.000000000 +0800 @@ -25,7 +25,6 @@ specified, plus with one sub package "de %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} %description devel This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-key_buildconflicts/000077500000000000000000000000001153164731700242235ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_buildconflicts/input.p000066400000000000000000000005661153164731700255520ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-06-21 16:34:38.000000000 +0800 @@ -12,6 +12,10 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +BuildConflicts: + - package-conflict1 + - package-conflict2 + Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-key_buildconflicts/output.p000066400000000000000000000005441153164731700257470ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:34:07.000000000 +0800 +++ output.spec 2010-06-21 16:34:38.000000000 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildConflicts: package-conflict1 +BuildConflicts: package-conflict2 %description spectacle-0.22/tests/specify_cases/test-key_check/000077500000000000000000000000001153164731700222745ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_check/input.p000066400000000000000000000003441153164731700236150ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 23:12:48.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +Check: yes SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_check/output.p000066400000000000000000000003561153164731700240210ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:09.000000000 +0800 +++ output.spec 2010-03-17 21:15:09.000000000 +0800 @@ -52,6 +52,10 @@ rm -rf %{buildroot} # >> install post # << install post +%check +# >> check +make check +# << check spectacle-0.22/tests/specify_cases/test-key_configoptions/000077500000000000000000000000001153164731700241005ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_configoptions/input.p000066400000000000000000000006501153164731700254210ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-09-07 11:40:02.000000000 +0800 +++ testpkg.yaml 2010-09-17 10:57:35.131317604 +0800 @@ -12,8 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +ConfigOptions: + - --yes-one + - --no-two +Builder: make SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_configoptions/output.p000066400000000000000000000007571153164731700256320ustar00rootroot00000000000000--- output.orig.spec 2010-09-17 10:57:05.335249886 +0800 +++ output.spec 2010-09-17 10:57:35.262208389 +0800 @@ -42,7 +42,11 @@ This package contains development files # >> build pre # << build pre +%configure --disable-static \ + --yes-one \ + --no-two +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +54,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-key_configure_default/000077500000000000000000000000001153164731700247045ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_configure_default/input.p000066400000000000000000000004761153164731700262330ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 23:37:17.000000000 +0800 @@ -12,7 +12,6 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none Builder: none SubPackages: spectacle-0.22/tests/specify_cases/test-key_configure_default/output.p000066400000000000000000000004151153164731700264250ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:04.000000000 +0800 +++ output.spec 2010-03-17 21:15:04.000000000 +0800 @@ -41,7 +41,7 @@ This package contains development files # >> build pre # << build pre - +%configure --disable-static # >> build post # << build post spectacle-0.22/tests/specify_cases/test-key_epoch/000077500000000000000000000000001153164731700223155ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_epoch/input.p000066400000000000000000000004441153164731700236370ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:57:55.000000000 +0800 @@ -2,6 +2,7 @@ Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 Release: 1 +Epoch: 1 Group: System/Base License: BSD URL: http://www.testpkg.org/ spectacle-0.22/tests/specify_cases/test-key_epoch/output.p000066400000000000000000000012121153164731700240320ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:10.000000000 +0800 +++ output.spec 2010-03-17 21:15:10.000000000 +0800 @@ -9,6 +9,7 @@ Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 Release: 1 +Epoch: 1 Group: System/Base License: BSD URL: http://www.testpkg.org/ @@ -25,7 +26,7 @@ specified, plus with one sub package "de %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-key_exclusivearch/000077500000000000000000000000001153164731700240645ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_exclusivearch/input.p000066400000000000000000000004631153164731700254070ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:53:57.000000000 +0800 @@ -4,6 +4,7 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD +ExclusiveArch: amd64 URL: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz spectacle-0.22/tests/specify_cases/test-key_exclusivearch/output.p000066400000000000000000000005341153164731700256070ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:10.000000000 +0800 +++ output.spec 2010-03-17 21:15:10.000000000 +0800 @@ -11,6 +11,7 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD +ExclusiveArch: amd64 URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml spectacle-0.22/tests/specify_cases/test-key_extrainstall/000077500000000000000000000000001153164731700237315ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_extrainstall/input.p000066400000000000000000000004361153164731700252540ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 23:09:33.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +ExtraInstall: | + # extra install scripts in %install + # etc. SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_extrainstall/output.p000066400000000000000000000004701153164731700254530ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:10.000000000 +0800 +++ output.spec 2010-03-17 21:15:11.000000000 +0800 @@ -49,6 +49,9 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +# extra install scripts in %install +# etc. + # >> install post # << install post spectacle-0.22/tests/specify_cases/test-key_files/000077500000000000000000000000001153164731700223215ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_files/input.p000066400000000000000000000004201153164731700236350ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:54:19.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +Files: + - "%doc README INST" + - "%{_bindir}/*" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_files/output.p000066400000000000000000000003601153164731700240410ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:11.000000000 +0800 +++ output.spec 2010-03-17 21:15:11.000000000 +0800 @@ -61,6 +61,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%doc README INST +%{_bindir}/* # >> files # << files spectacle-0.22/tests/specify_cases/test-key_filesinput/000077500000000000000000000000001153164731700234015ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_filesinput/input.p000066400000000000000000000003631153164731700247230ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 18:12:14.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +FilesInput: morefiles.lst SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_filesinput/output.p000066400000000000000000000003531153164731700251230ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:11.000000000 +0800 +++ output.spec 2010-03-17 21:15:11.000000000 +0800 @@ -59,7 +59,7 @@ rm -rf %{buildroot} -%files +%files -f morefiles.lst %defattr(-,root,root,-) # >> files # << files spectacle-0.22/tests/specify_cases/test-key_localeopts_without_localename/000077500000000000000000000000001153164731700273275ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_localeopts_without_localename/input.p000066400000000000000000000003571153164731700306540ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:09:42.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +LocaleOptions: -gnome SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_localeopts_without_localename/output.2p000066400000000000000000000005221153164731700311310ustar00rootroot00000000000000--- output.2.o 2010-03-17 21:15:14.000000000 +0800 +++ output.2 2010-03-17 21:15:14.000000000 +0800 @@ -1,2 +1,3 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools +Warning: lost "LocaleName" keyword, use "%{name}" as default Info: Creating new spec file: output.spec spectacle-0.22/tests/specify_cases/test-key_localeopts_without_localename/output.p000066400000000000000000000005311153164731700310470ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:14.000000000 +0800 +++ output.spec 2010-03-17 21:15:14.000000000 +0800 @@ -52,6 +52,7 @@ rm -rf %{buildroot} # >> install post # << install post +%find_lang %{name} -gnome @@ -59,7 +60,7 @@ rm -rf %{buildroot} -%files +%files -f %{name}.lang %defattr(-,root,root,-) # >> files # << files spectacle-0.22/tests/specify_cases/test-key_noautolocale/000077500000000000000000000000001153164731700237045ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_noautolocale/input.p000066400000000000000000000004031153164731700252210ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-18 16:04:23.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +PkgBR: + - intltool +NoAutoLocale: yes SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_noautolocale/output.p000066400000000000000000000005641153164731700254320ustar00rootroot00000000000000--- output.orig.spec 2010-03-18 16:06:30.000000000 +0800 +++ output.spec 2010-03-18 16:06:30.000000000 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: intltool %description Sample package for spectacle testings, which will be used as spectacle-0.22/tests/specify_cases/test-key_noautoreq_noautoprov/000077500000000000000000000000001153164731700255305ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_noautoreq_noautoprov/input.p000066400000000000000000000005211153164731700270460ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:06:15.000000000 +0800 @@ -12,6 +12,8 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +NoAutoReq: yes +NoAutoProv: yes Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-key_noautoreq_noautoprov/output.p000066400000000000000000000004671153164731700272600ustar00rootroot00000000000000--- output.orig.spec 2010-07-06 18:53:41.052001337 +0800 +++ output.spec 2010-07-06 18:53:41.206652613 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +AutoReq: 0 +AutoProv: 0 %description spectacle-0.22/tests/specify_cases/test-key_nodesktop/000077500000000000000000000000001153164731700232255ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_nodesktop/input.p000066400000000000000000000004341153164731700245460ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-04-22 19:12:36.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +NoDesktop: yes +Files: + - "%{_datadir}/applications/*.desktop" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_nodesktop/output.p000066400000000000000000000003641153164731700247510ustar00rootroot00000000000000--- output.orig.spec 2010-05-16 19:00:18.000000000 +0800 +++ output.spec 2010-05-16 19:00:18.000000000 +0800 @@ -64,6 +64,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_datadir}/applications/*.desktop # >> files # << files spectacle-0.22/tests/specify_cases/test-key_nosetup/000077500000000000000000000000001153164731700227145ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_nosetup/input.p000066400000000000000000000004761153164731700242430ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-10 23:54:35.000000000 +0800 @@ -12,6 +12,7 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +NoSetup: yes Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-key_nosetup/output.p000066400000000000000000000003721153164731700244370ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:12.000000000 +0800 +++ output.spec 2010-03-17 21:15:12.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n %{name}-%{version} +# No setup # >> setup # << setup spectacle-0.22/tests/specify_cases/test-key_prefix/000077500000000000000000000000001153164731700225145ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_prefix/input.p000066400000000000000000000003461153164731700240370ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-07-07 09:40:21.655437506 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +Prefix: /opt SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_prefix/output.p000066400000000000000000000005241153164731700242360ustar00rootroot00000000000000--- output.orig.spec 2010-07-07 09:40:12.216880219 +0800 +++ output.spec 2010-07-07 09:40:22.080459763 +0800 @@ -11,6 +11,7 @@ Version: 1.0 Release: 1 Group: System/Base License: BSD +Prefix: /opt URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml spectacle-0.22/tests/specify_cases/test-key_qmakeoptions/000077500000000000000000000000001153164731700237315ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_qmakeoptions/input.p000066400000000000000000000006271153164731700252560ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-09-07 11:40:02.000000000 +0800 +++ testpkg.yaml 2010-09-17 10:58:15.238565836 +0800 @@ -12,8 +12,10 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Builder: qmake +QMakeOptions: + - --qmake-one + - --qmake-two SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_qmakeoptions/output.p000066400000000000000000000007411153164731700254540ustar00rootroot00000000000000--- output.orig.spec 2010-09-17 10:57:44.102208294 +0800 +++ output.spec 2010-09-17 10:58:15.364208593 +0800 @@ -42,7 +42,11 @@ This package contains development files # >> build pre # << build pre +%qmake \ + --qmake-one \ + --qmake-two +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +54,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%qmake_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-key_qmakeoptions_multidistros/000077500000000000000000000000001153164731700265535ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_qmakeoptions_multidistros/input.p000066400000000000000000000006611153164731700300760ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-09-07 11:40:02.000000000 +0800 +++ testpkg.yaml 2010-09-17 10:58:52.978252858 +0800 @@ -12,8 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +SupportOtherDistros: yes +Builder: qmake +QMakeOptions: + - --qmake-one + - --qmake-two SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_qmakeoptions_multidistros/output.p000066400000000000000000000020321153164731700302710ustar00rootroot00000000000000--- output.orig.spec 2010-09-18 20:49:44.463208617 +0800 +++ output.spec 2010-09-18 20:49:44.564208474 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -42,14 +43,33 @@ This package contains development files # >> build pre # << build pre +%if 0%{?moblin_version} +%qmake \ +%else +qmake -makefile -nocache \ + "QMAKE_CFLAGS_RELEASE=${CFLAGS:-%optflags}" \ + "QMAKE_CFLAGS_DEBUG=${CFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS:-%optflags}" \ + QMAKE_STRIP=: \ + PREFIX=%{_prefix} \ +%endif + --qmake-one \ + --qmake-two +make %{?jobs:-j%jobs} # >> build post # << build post %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT # >> install pre # << install pre +%if 0%{?moblin_version} +%qmake_install +%else +%makeinstall +%endif # >> install post # << install post spectacle-0.22/tests/specify_cases/test-key_runfdupes/000077500000000000000000000000001153164731700232325ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_runfdupes/input.p000066400000000000000000000003621153164731700245530ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:36:16.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +RunFdupes: "%{_datadir}" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_runfdupes/output.p000066400000000000000000000007511153164731700247560ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:12.000000000 +0800 +++ output.spec 2010-03-17 21:15:12.000000000 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: fdupes %description Sample package for spectacle testings, which will be used as @@ -52,6 +53,7 @@ rm -rf %{buildroot} # >> install post # << install post +%fdupes %{buildroot}/%{_datadir} spectacle-0.22/tests/specify_cases/test-key_setupoptions/000077500000000000000000000000001153164731700237735ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_setupoptions/input.p000066400000000000000000000003721153164731700253150ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 23:06:35.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +SetupOptions: --setup-opt-sample SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_setupoptions/output.p000066400000000000000000000004111153164731700255100ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:12.000000000 +0800 +++ output.spec 2010-03-17 21:15:13.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n %{name}-%{version} +%setup --setup-opt-sample # >> setup # << setup spectacle-0.22/tests/specify_cases/test-key_sourceprefix/000077500000000000000000000000001153164731700237355ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_sourceprefix/input.p000066400000000000000000000005131153164731700252540ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 15:37:40.000000000 +0800 @@ -12,6 +12,7 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +SourcePrefix: fake-prefix Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-key_sourceprefix/output.p000066400000000000000000000004101153164731700254510ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:13.000000000 +0800 +++ output.spec 2010-03-17 21:15:13.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n %{name}-%{version} +%setup -q -n fake-prefix # >> setup # << setup spectacle-0.22/tests/specify_cases/test-key_supportotherdistros/000077500000000000000000000000001153164731700254055ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_supportotherdistros/input.p000066400000000000000000000004661153164731700267330ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 17:54:17.000000000 +0800 @@ -13,7 +13,8 @@ Description: | specified, plus with one sub package "devel". Configure: none -Builder: none +Builder: python +SupportOtherDistros: yes SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_supportotherdistros/output.p000066400000000000000000000021041153164731700271230ustar00rootroot00000000000000--- output.orig.spec 2010-05-16 19:03:04.000000000 +0800 +++ output.spec 2010-05-16 19:03:04.000000000 +0800 @@ -5,6 +5,7 @@ # >> macros # << macros +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: testpkg Summary: Sample package for spectacle testings Version: 1.0 @@ -14,6 +15,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -42,14 +44,19 @@ This package contains development files # >> build pre # << build pre - +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build # >> build post # << build post %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT # >> install pre # << install pre +%if 0%{?suse_version} +%{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix} +%else +%{__python} setup.py install --root=$RPM_BUILD_ROOT -O1 +%endif # >> install post # << install post spectacle-0.22/tests/specify_cases/test-key_updatedesktopdb/000077500000000000000000000000001153164731700244015ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_updatedesktopdb/input.p000066400000000000000000000004421153164731700257210ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-04-22 19:12:36.000000000 +0800 @@ -14,6 +14,9 @@ Description: | Configure: none Builder: none +UpdateDesktopDB: yes +Files: + - "%{_datadir}/applications/*.desktop" SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_updatedesktopdb/output.p000066400000000000000000000016501153164731700261240ustar00rootroot00000000000000--- output.orig.spec 2010-05-16 19:01:30.000000000 +0800 +++ output.spec 2010-05-16 19:01:30.000000000 +0800 @@ -14,6 +14,9 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils +BuildRequires: desktop-file-utils %description @@ -53,10 +56,17 @@ rm -rf %{buildroot} # >> install post # << install post +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/*.desktop +%post +update-desktop-database %{_datadir}/applications &> /dev/null || : +%postun +update-desktop-database %{_datadir}/applications &> /dev/null || : @@ -64,6 +74,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{_datadir}/applications/*.desktop # >> files # << files spectacle-0.22/tests/specify_cases/test-key_useasneeded/000077500000000000000000000000001153164731700235045ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-key_useasneeded/input.p000066400000000000000000000003511153164731700250230ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-14 15:07:40.000000000 +0800 @@ -14,6 +14,7 @@ Description: | Configure: none Builder: none +UseAsNeeded: no SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-key_useasneeded/output.p000066400000000000000000000003641153164731700252300ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:18.000000000 +0800 +++ output.spec 2010-03-17 21:15:19.000000000 +0800 @@ -38,6 +38,7 @@ This package contains development files # << setup %build +unset LD_AS_NEEDED # >> build pre # << build pre spectacle-0.22/tests/specify_cases/test-namespace_configoptions/000077500000000000000000000000001153164731700252445ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_configoptions/input.p000066400000000000000000000007101153164731700265620ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:16:49.000000000 +0800 @@ -12,8 +12,13 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +Configure: configure +ConfigOptions: + - --common-opt + - arm:--arm-opt + - ix86:--x86-opt + +Builder: make SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-namespace_configoptions/output.p000066400000000000000000000010671153164731700267710ustar00rootroot00000000000000--- output.orig.spec 2010-06-21 16:41:36.000000000 +0800 +++ output.spec 2010-06-21 16:41:36.000000000 +0800 @@ -42,7 +42,16 @@ This package contains development files # >> build pre # << build pre +%configure --disable-static \ + --common-opt \ +%ifarch %{arm} + --arm-opt \ +%endif +%ifarch %{ix86} + --x86-opt +%endif +make %{?jobs:-j%jobs} # >> build post # << build post @@ -50,6 +59,7 @@ This package contains development files rm -rf %{buildroot} # >> install pre # << install pre +%make_install # >> install post # << install post spectacle-0.22/tests/specify_cases/test-namespace_patches/000077500000000000000000000000001153164731700240125ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_patches/input.p000066400000000000000000000007331153164731700253350ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:13:43.000000000 +0800 @@ -7,6 +7,10 @@ License: BSD URL: http://www.testpkg.org/ Sources: - http://www.testpkg.org/testpkg-%{version}.tar.gz +Patches: + - common-patch + - arm:arm-only-patch + - ix86:x86-only-patch Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords spectacle-0.22/tests/specify_cases/test-namespace_patches/output.p000066400000000000000000000012551153164731700255360ustar00rootroot00000000000000--- output.orig.spec 2010-12-09 13:51:58.537023891 +0800 +++ output.spec 2010-12-09 13:51:58.654023776 +0800 @@ -14,6 +14,13 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Patch0: common-patch +%ifarch %{arm} +Patch1: arm-only-patch +%endif +%ifarch %{ix86} +Patch2: x86-only-patch +%endif %description @@ -35,6 +42,16 @@ This package contains development files %prep %setup -q -n %{name}-%{version} +# common-patch +%patch0 -p1 +%ifarch %{arm} +# arm-only-patch +%patch1 -p1 +%endif +%ifarch %{ix86} +# x86-only-patch +%patch2 -p1 +%endif # >> setup # << setup spectacle-0.22/tests/specify_cases/test-namespace_pkgbr/000077500000000000000000000000001153164731700234705ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_pkgbr/input.p000066400000000000000000000005611153164731700250120ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:14:41.000000000 +0800 @@ -12,6 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +PkgBR: + - common-br + - arm:arm-br + - ix86:x86-br + Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-namespace_pkgbr/output.p000066400000000000000000000007271153164731700252170ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 17:14:08.000000000 +0800 +++ output.spec 2010-03-30 17:14:42.000000000 +0800 @@ -14,6 +14,13 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: common-br +%ifarch %{arm} +BuildRequires: arm-br +%endif +%ifarch %{ix86} +BuildRequires: x86-br +%endif %description Sample package for spectacle testings, which will be used as spectacle-0.22/tests/specify_cases/test-namespace_pkgconfigbr/000077500000000000000000000000001153164731700246565ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_pkgconfigbr/input.p000066400000000000000000000006351153164731700262020ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:15:43.000000000 +0800 @@ -12,6 +12,11 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +PkgConfigBR: + - common-pkgcfg + - arm:arm-pkgcfg >= 0.11 + - ix86:x86-pkgcfg >= %{xxx_version} + Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-namespace_pkgconfigbr/output.p000066400000000000000000000010361153164731700263770ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 17:14:57.000000000 +0800 +++ output.spec 2010-03-30 17:15:44.000000000 +0800 @@ -14,6 +14,13 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRequires: pkgconfig(common-pkgcfg) +%ifarch %{arm} +BuildRequires: pkgconfig(arm-pkgcfg) >= 0.11 +%endif +%ifarch %{ix86} +BuildRequires: pkgconfig(x86-pkgcfg) >= %{xxx_version} +%endif %description Sample package for spectacle testings, which will be used as spectacle-0.22/tests/specify_cases/test-namespace_qmakeoptions/000077500000000000000000000000001153164731700250755ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_qmakeoptions/input.p000066400000000000000000000007151153164731700264200ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-09-07 11:40:02.000000000 +0800 +++ testpkg.yaml 2010-09-17 11:00:19.520567286 +0800 @@ -12,8 +12,12 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". -Configure: none -Builder: none +SupportOtherDistros: yes +Builder: qmake +QMakeOptions: + - arm:--arm-only + - ix86:--ix86-only + - --common-one SubPackages: - Name: devel spectacle-0.22/tests/specify_cases/test-namespace_qmakeoptions/output.p000066400000000000000000000021361153164731700266200ustar00rootroot00000000000000--- output.orig.spec 2010-09-18 20:50:28.332208173 +0800 +++ output.spec 2010-09-18 20:50:28.434208377 +0800 @@ -14,6 +14,7 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -42,14 +43,38 @@ This package contains development files # >> build pre # << build pre +%if 0%{?moblin_version} +%qmake \ +%else +qmake -makefile -nocache \ + "QMAKE_CFLAGS_RELEASE=${CFLAGS:-%optflags}" \ + "QMAKE_CFLAGS_DEBUG=${CFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS:-%optflags}" \ + "QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS:-%optflags}" \ + QMAKE_STRIP=: \ + PREFIX=%{_prefix} \ +%endif +%ifarch %{arm} + --arm-only \ +%endif +%ifarch %{ix86} + --ix86-only \ +%endif + --common-one +make %{?jobs:-j%jobs} # >> build post # << build post %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT # >> install pre # << install pre +%if 0%{?moblin_version} +%qmake_install +%else +%makeinstall +%endif # >> install post # << install post spectacle-0.22/tests/specify_cases/test-namespace_requires/000077500000000000000000000000001153164731700242225ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-namespace_requires/input.p000066400000000000000000000013131153164731700255400ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-15 12:26:52.000000000 +0800 +++ testpkg.yaml 2010-03-30 17:11:48.000000000 +0800 @@ -11,6 +11,10 @@ Description: | Sample package for spectacle testings, which will be used as the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +Requires: + - arm:arm-pkgs + - ix86:x86-pkgs + - common-pkgs Configure: none Builder: none @@ -20,3 +24,7 @@ SubPackages: Summary: Development files for %{name} Group: Development/Libraries Description: This package contains development files for %{name}. + Requires: + - arm:arm-pkgs + - ix86:x86-pkgs + - common-pkgs spectacle-0.22/tests/specify_cases/test-namespace_requires/output.p000066400000000000000000000015121153164731700257420ustar00rootroot00000000000000--- output.orig.spec 2010-03-30 17:12:36.000000000 +0800 +++ output.spec 2010-03-30 17:12:37.000000000 +0800 @@ -14,6 +14,13 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +%ifarch %{arm} +Requires: arm-pkgs +%endif +%ifarch %{ix86} +Requires: x86-pkgs +%endif +Requires: common-pkgs %description Sample package for spectacle testings, which will be used as @@ -26,6 +33,13 @@ specified, plus with one sub package "de Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +%ifarch %{arm} +Requires: arm-pkgs +%endif +%ifarch %{ix86} +Requires: x86-pkgs +%endif +Requires: common-pkgs %description devel This package contains development files for %{name}. spectacle-0.22/tests/specify_cases/test-pholder_postun/000077500000000000000000000000001153164731700234145ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-pholder_postun/input.p000066400000000000000000000025551153164731700247430ustar00rootroot00000000000000--- /dev/null 2010-03-01 09:42:51.548118450 +0800 +++ output.spec 2010-03-16 17:58:02.000000000 +0800 @@ -0,0 +1,77 @@ +# +# Do not Edit! Generated by: +# spectacle version 0.13 +# +# >> macros +# << macros + +Name: testpkg +Summary: Sample package for spectacle testings +Version: 1.0 +Release: 1 +Group: System/Base +License: BSD +URL: http://www.testpkg.org/ +Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz +Source100: testpkg.yaml + +%description +Sample package for spectacle testings, which will be used as +the base of all testings. In this YAML file, only basic keywords +specified, plus with one sub package "devel". + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + + + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre + +# >> install post +# << install post + + + + + +%postun +# >> postun +# customized postun scripts here +# for testing +# << postun + + +%files +%defattr(-,root,root,-) +# >> files +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +# << files devel + spectacle-0.22/tests/specify_cases/test-pholder_postun/output.2p000066400000000000000000000005661153164731700252260ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:02:42.067225740 +0800 +++ output.2 2010-07-23 11:02:42.215377186 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Info: Old spec file exists, patching output.spec ... spectacle-0.22/tests/specify_cases/test-pholder_postun/output.p000066400000000000000000000003641153164731700251400ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:02:42.067225740 +0800 +++ output.spec 2010-07-23 11:02:42.215377186 +0800 @@ -57,6 +57,11 @@ rm -rf %{buildroot} +%postun +# >> postun +# customized postun scripts here +# for testing +# << postun spectacle-0.22/tests/specify_cases/test-pholder_pre/000077500000000000000000000000001153164731700226525ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-pholder_pre/input.p000066400000000000000000000025321153164731700241740ustar00rootroot00000000000000--- /dev/null 2010-03-01 09:42:51.548118450 +0800 +++ output.spec 2010-03-16 18:06:45.000000000 +0800 @@ -0,0 +1,78 @@ +# +# Do not Edit! Generated by: +# spectacle version 0.13 +# +# >> macros +# << macros + +Name: testpkg +Summary: Sample package for spectacle testings +Version: 1.0 +Release: 1 +Group: System/Base +License: BSD +URL: http://www.testpkg.org/ +Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz +Source100: testpkg.yaml + +%description +Sample package for spectacle testings, which will be used as +the base of all testings. In this YAML file, only basic keywords +specified, plus with one sub package "devel". + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + + + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre + +# >> install post +# << install post + + + +%pre +# >> pre +# extra pre scripts +# for testing +# << pre + + + + + +%files +%defattr(-,root,root,-) +# >> files +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +# << files devel + spectacle-0.22/tests/specify_cases/test-pholder_pre/output.2p000066400000000000000000000005661153164731700244640ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:02:56.853990880 +0800 +++ output.2 2010-07-23 11:02:57.015010615 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Info: Old spec file exists, patching output.spec ... spectacle-0.22/tests/specify_cases/test-pholder_pre/output.p000066400000000000000000000004001153164731700243650ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:02:56.853990880 +0800 +++ output.spec 2010-07-23 11:02:57.007028539 +0800 @@ -54,6 +54,11 @@ rm -rf %{buildroot} # >> install post # << install post +%pre +# >> pre +# extra pre scripts +# for testing +# << pre spectacle-0.22/tests/specify_cases/test-pholder_preun/000077500000000000000000000000001153164731700232155ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-pholder_preun/input.p000066400000000000000000000025421153164731700245400ustar00rootroot00000000000000--- /dev/null 2010-03-01 09:42:51.548118450 +0800 +++ output.spec 2010-03-16 18:06:45.000000000 +0800 @@ -0,0 +1,78 @@ +# +# Do not Edit! Generated by: +# spectacle version 0.13 +# +# >> macros +# << macros + +Name: testpkg +Summary: Sample package for spectacle testings +Version: 1.0 +Release: 1 +Group: System/Base +License: BSD +URL: http://www.testpkg.org/ +Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz +Source100: testpkg.yaml + +%description +Sample package for spectacle testings, which will be used as +the base of all testings. In this YAML file, only basic keywords +specified, plus with one sub package "devel". + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + + + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre + +# >> install post +# << install post + + + +%preun +# >> preun +# extra preun scripts +# for testing +# << preun + + + + + +%files +%defattr(-,root,root,-) +# >> files +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +# << files devel + spectacle-0.22/tests/specify_cases/test-pholder_preun/output.2p000066400000000000000000000005661153164731700250270ustar00rootroot00000000000000--- output.2.o 2010-07-23 11:03:08.094988800 +0800 +++ output.2 2010-07-23 11:03:08.261652945 +0800 @@ -1,2 +1,2 @@ Warning: There is no "Makefile" for this package, please update it using packaging-tools -Warning: NEW spec file created: output.spec, maybe customized spec content is needed! +Info: Old spec file exists, patching output.spec ... spectacle-0.22/tests/specify_cases/test-pholder_preun/output.p000066400000000000000000000003671153164731700247440ustar00rootroot00000000000000--- output.orig.spec 2010-07-23 11:03:08.094988800 +0800 +++ output.spec 2010-07-23 11:03:08.261652945 +0800 @@ -55,6 +55,11 @@ rm -rf %{buildroot} # << install post +%preun +# >> preun +# extra preun scripts +# for testing +# << preun spectacle-0.22/tests/specify_cases/test-series_conf/000077500000000000000000000000001153164731700226465ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-series_conf/input.p000066400000000000000000000002741153164731700241710ustar00rootroot00000000000000--- /dev/null 2010-03-10 23:37:54.000000000 +0800 +++ series.conf 2010-03-10 23:37:41.000000000 +0800 @@ -0,0 +1,4 @@ +# comment of patch1 +patch1.patch +# comment of patch2 +patch2.patch spectacle-0.22/tests/specify_cases/test-series_conf/output.p000066400000000000000000000010651153164731700243710ustar00rootroot00000000000000--- output.orig.spec 2010-12-09 13:51:45.727876005 +0800 +++ output.spec 2010-12-09 13:51:45.843107241 +0800 @@ -14,6 +14,8 @@ License: BSD URL: http://www.testpkg.org/ Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz Source100: testpkg.yaml +Patch0: patch1.patch +Patch1: patch2.patch %description @@ -35,6 +37,12 @@ This package contains development files %prep %setup -q -n %{name}-%{version} +# comment of patch1 +# patch1.patch +%patch0 -p1 +# comment of patch2 +# patch2.patch +%patch1 -p1 # >> setup # << setup spectacle-0.22/tests/specify_cases/test-sourceprefix_from_tarball/000077500000000000000000000000001153164731700256115ustar00rootroot00000000000000spectacle-0.22/tests/specify_cases/test-sourceprefix_from_tarball/input.p000066400000000000000000000005131153164731700271300ustar00rootroot00000000000000--- ../base/testpkg.yaml 2010-03-09 17:48:35.000000000 +0800 +++ testpkg.yaml 2010-03-11 15:37:40.000000000 +0800 @@ -12,6 +12,7 @@ Description: | the base of all testings. In this YAML file, only basic keywords specified, plus with one sub package "devel". +SourcePrefix: fake-prefix Configure: none Builder: none spectacle-0.22/tests/specify_cases/test-sourceprefix_from_tarball/output.p000066400000000000000000000004101153164731700273250ustar00rootroot00000000000000--- output.orig.spec 2010-03-17 21:15:18.000000000 +0800 +++ output.spec 2010-03-17 21:15:18.000000000 +0800 @@ -32,7 +32,7 @@ This package contains development files %prep -%setup -q -n this-is-new-prefix +%setup -q -n fake-prefix # >> setup # << setup spectacle-0.22/tests/specify_cases/test-sourceprefix_from_tarball/testpkg-1.0.tar.gz000066400000000000000000000002451153164731700307160ustar00rootroot00000000000000V KA 0%(N$=`FlqlGmdIn9׺6Ui"xoSΌ[ NΈUu2$\ƴ(c\Z\jxJ>Kޑ#??zS (spectacle-0.22/tests/test_specify.py000066400000000000000000000035331153164731700176310ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os,sys import glob import tempfile import subprocess import unittest from testbase import * class TestSpecifyKeys(unittest.TestCase): cases_dir = 'specify_cases' # build cases on the fly based on directories if os.path.isdir(cases_dir): for case in glob.glob(os.path.join(cases_dir, 'test-*')): if not os.path.exists(os.path.join(case, 'input.p')): continue case = os.path.basename(case)[5:] newmethod = """ def test_%s(self): print "case %s ok" self.assertTrue(self._compare_out_file("%s")) """ % (case, case, case) exec newmethod in locals() def _compare_out_file(self, case): prep_working_env(self.cases_dir, case, self.work_dir) if run_and_check(self.work_dir): return (compare_outfile(self.work_dir)) else: return False def setUp(self): self.work_dir = tempfile.mkdtemp() def tearDown(self): cleanup(self.work_dir) def suite(): tl = unittest.TestLoader() return tl.loadTestsFromModule(sys.modules[__name__]) spectacle-0.22/tests/testbase.py000066400000000000000000000076651153164731700167540ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. SCRIPTS = """ specify -N -n -o output.spec testpkg.yaml 1>output.1.o 2>output.2.o mv output.spec output.orig.spec patch -s < input.p specify -N -n -o output.spec testpkg.yaml 1>ouput.1 2>output.2 if [ ! -f output.no -a ! -f output.spec ]; then mv output.2 output.error exit 1 fi if [ -f output.p ]; then diff -upN output.orig.spec output.spec > newoutput.p mv output.spec output.new.spec patch < output.p >/dev/null fi if [ -f output.1p ]; then diff -upN output.1.o output.1 > newoutput.1p mv output.1 output.1.n patch < output.1p >/dev/null fi if [ -f output.2p ]; then diff -upN output.2.o output.2 > newoutput.2p mv output.2 output.2.n patch < output.2p >/dev/null fi """ import os,sys import glob import shutil import filecmp BLUE='\033[%dm' % 34 RED='\033[%dm' % 31 RESET = '\033[0m' def prep_working_env(cases_dir, case, dst_dir): shutil.copy(os.path.join(cases_dir, 'base', 'testpkg.yaml'), dst_dir) for out in glob.glob(os.path.join(cases_dir, 'test-'+case, '*')): try: if not os.path.isdir(out): shutil.copy(out, dst_dir) except: pass # ignore if file missing def cleanup(work_dir): shutil.rmtree(work_dir) def run_and_check(work_dir): result = True cwd = os.getcwd() os.chdir(work_dir) os.system(SCRIPTS) if os.path.exists('output.error'): # something wrong with tested tools print >> sys.stderr, file(os.path.join(work_dir, 'output.error')).read() result = False os.chdir(cwd) return result def compare_outfile(work_dir): all_equ = True #print glob.glob(os.path.join(work_dir, '*')) desc = {'output.p': '*.spec', 'output.1p': 'STDOUT', 'output.2p': 'STDERR'} orig = {'output.p': 'output.orig.spec', 'output.1p': 'output.1.o', 'output.2p': 'output.2.o'} new = {'output.p': 'output.new.spec', 'output.1p': 'output.1.n', 'output.2p': 'output.2.n'} for out in ('output.p', 'output.1p', 'output.2p'): fp = os.path.join(work_dir, out) if os.path.exists(fp): if not filecmp.cmp(os.path.join(work_dir, orig[out]),\ os.path.join(work_dir, new[out])): all_equ = False exp_output_diff = file(fp).read().strip() output_diff = file(os.path.join(work_dir, 'new'+out)).read().strip() if not output_diff: output_diff = '' if not exp_output_diff: exp_output_diff = '' print "%sExpected changes of %s:" % (BLUE,desc[out]) print '----------------------------------------------------------------------%s' % RESET print exp_output_diff print '%s----------------------------------------------------------------------%s' % (BLUE,RESET) print "%sActual:" % RED print '----------------------------------------------------------------------%s' % RESET print output_diff print '%s----------------------------------------------------------------------%s' % (RED,RESET) return all_equ spectacle-0.22/tools/000077500000000000000000000000001153164731700145505ustar00rootroot00000000000000spectacle-0.22/tools/ini2spectacle000077500000000000000000000251731153164731700172330ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Overview of ini2yaml (1) ini2yaml reads the ini file and divides it into segments. (2) Parses the 'header' segment. Write out the key,value pairs (3) Expand the 'Files' if found (4) Parse the sub-packages segments if found """ import os import sys import re import shutil import optparse from ConfigParser import RawConfigParser # spectacle modules from spectacle.convertor import * from spectacle.dumper import * from spectacle import logger class SBConvertor(Convertor): """ Convertor for SpecBuild ini files """ def __init__(self): sb_cv_table = { 'BuildRequires': 'PkgBR', 'PkgConfig': 'PkgConfigBR', 'Extras': 'ExtraSources', 'Extra': 'extra', } Convertor.__init__(self, sb_cv_table) class SBConfigParser(RawConfigParser): """ SpecBuild ini specific parser """ # keys whose value need to split to list multi_keys = ('Sources', 'Patches', 'Extras', 'LocaleOptions', ) # keys whose value may have ver numbers reqs_keys = ('BuildRequires', 'PreRequires', 'Requires', 'PostRequires', 'PkgConfig', 'Provides', 'Obsoletes', 'Conflicts', ) # keys whose value need to be expand(reading extra file) expand_keys = ('Files', 'Description', 'PostMakeExtras', 'PostMakeInstallExtras', ) # boolean keys bool_keys = ('UseAsNeeded', 'NoAutoReq', 'NoAutoProv', 'AddCheck', ) # keys need to be placed to 'extra' extra_keys = ['Files', 'PostMakeExtras', 'PostMakeInstallExtras', ] # must have keys must_keys = {'Release': '1', 'Configure': 'configure', } def __init__(self, include_files): RawConfigParser.__init__(self) if include_files: self.extra_keys.remove('Files') self.record_used_files = [] self._check_Makefile() def _check_Makefile(self): """ Check whether Makefile in working dir should be moved """ if os.path.exists('Makefile'): try: cont = file('Makefile').read() if re.search('\s+spec-builder\s+', cont): # The Makefile is for spec-builder self.record_used_files.append('Makefile') except: pass def read(self, filenames): """ override super read to record input files """ if isinstance(filenames, basestring): filenames = [filenames] self.record_used_files.extend(filenames) return RawConfigParser.read(self, filenames) def optionxform(self, option): # Capitalize the first char lead = option[0] if lead.upper() != lead: return lead.upper() + option[1:] else: return option def _expand_single(self, filename): """ Helper function to expand *.desc """ if os.path.exists(filename): self.record_used_files.append(filename) return file(filename).read().strip() else: logger.warning("Warning: missing expected file %s" % filename) return None def _cook_config(self): """ Helper function to update fields for spec-builder specific ones """ all_items = {} main_extra = {} # for extra keys of main pkg for section in self.sections(): items = self._sections[section] # Convert space seperated string to list for key in self.multi_keys: if key in items: self.set(section, key, map(str.strip, items[key].split())) # Convert dependent like entry to list for key in self.reqs_keys: if key in items: reqs = [] for entry in re.findall('\S+\s+[<>=]+\s+\S+|\S+', items[key]): reqs.append(entry.split(',')[0]) self.set(section, key, reqs) # special cases for 'ConfigOptions' if 'ConfigOptions' in items: self.set(section, 'ConfigOptions', map(lambda s: '--'+s, [opt for opt in map(str.strip, items['ConfigOptions'].split('--')) if opt])) # special cases for 'LocaleOptions' if 'LocaleOptions' in items and 'LocaleName' not in items: self.set(section, 'LocaleName', '%{name}') # Convert boolean keys for key in self.bool_keys: if key in items: if items[key].upper() in ('NO', 'FALSE', '0'): del items[key] else: self.set(section, key, 'yes') # Convert keys which need expanding from external file for key in self.expand_keys: if key in items: content = self._expand_single(items[key]) if content: if key == 'Files': # 'Files' need split to list self.set(section, key, content.split('\n')) else: self.set(section, key, content) else: # if file empty or file not exists, remove the empty key del items[key] # move extra keys to 'extra' key extra = {} for key in self.extra_keys: if key in items: extra[key] = items[key] del items[key] if extra: if section not in ('header', 'configuration'): self.set(section, 'extra', extra) else: main_extra.update(extra) for section in self.sections(): if section in ('header', 'configuration'): all_items.update(dict(self.items(section))) if main_extra: all_items['extra'] = main_extra # Checking must-have keys for key, default in self.must_keys.iteritems(): if key not in all_items: all_items[key] = default # Re-structure sub packages to inner level if 'SubPackages' in all_items: subpkg_list = all_items['SubPackages'].split() all_items['SubPackages'] = [] for subpkg in subpkg_list: try: all_items['SubPackages'].append(dict(self.items(subpkg))) all_items['SubPackages'][-1].update({'Name': subpkg}) except NoSectionError, e: logger.warning('Needed section for sub-package %s not found' % subpkg) raise e return all_items def cooked_items(self): """ return all items, cooked to the input of convertor """ return self._cook_config() def parse_options(args): import spectacle.__version__ usage = "Usage: %prog [options] [ini-path]" parser = optparse.OptionParser(usage, version=spectacle.__version__.VERSION) parser.add_option("-o", "--output", type="string", dest="outfile_path", default=None, help="Path of output yaml file") parser.add_option("-f", "--include-files", action="store_true", dest="include_files", default=False, help="To store files list in YAML file") return parser.parse_args() if __name__ == '__main__': """ Main Function """ (options, args) = parse_options(sys.argv[1:]) if not args: # no ini-path specified, search in CWD import glob inils = glob.glob('*.ini') if not inils: logger.error('Cannot find valid spec-builder file(*.ini) in current directory, please specify one.') elif len(inils) > 1: logger.error('Find multiple spec-builder files(*.ini) in current directory, please specify one.') ini_fpath = inils[0] else: ini_fpath = args[0] # Check if the input file exists if not os.path.exists(ini_fpath): # input file does not exist logger.error("%s: File does not exist" % ini_fpath) # check the working path if ini_fpath.find('/') != -1 and os.path.dirname(ini_fpath) != os.path.curdir: wdir = os.path.dirname(ini_fpath) logger.info('Changing to working dir: %s' % wdir) os.chdir(wdir) ini_fname = os.path.basename(ini_fpath) if options.outfile_path: out_fpath = options.outfile_path else: if ini_fname.endswith('.ini'): out_fpath = ini_fname[:-3] + 'yaml' else: out_fpath = ini_fname + '.yaml' """Read the input file""" config = SBConfigParser(include_files = options.include_files) config.read(ini_fname) convertor = SBConvertor() """Dump them to spectacle file""" dumper = SpectacleDumper(format='yaml', opath = out_fpath) spec_fpath = dumper.dump(convertor.convert(config.cooked_items())) logger.info('Yaml file %s created' % out_fpath) if spec_fpath: logger.info('Spec file %s was created with extra data' % spec_fpath) # move old spec-builder files to backup dir backDir = 'spec-builder.backup' try: os.mkdir(backDir) except: pass if os.path.exists(backDir) and not os.path.isfile(backDir): logger.info('The following used spec-builder files are moved to dir: %s' % backDir) for file in config.record_used_files: logger.info('\t' + os.path.basename(file)) shutil.move(file, backDir) spectacle-0.22/tools/spec2spectacle000077500000000000000000000620511153164731700174020ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Overview of spec2spectacle """ import os import sys import re import glob import optparse # spectacle modules from spectacle.convertor import * from spectacle.dumper import * from spectacle import logger class SpecError(Exception): def __ini__(self, cur_state, cur_pkg, cur_line): self.cur_state = cur_state self.cur_pkg = cur_pkg self.cur_line = cur_line def __repr__(self): return self.cur_state + self.cur_pkg + self.cur_line class SpecFormatError(SpecError): pass class SpecUnknowLineError(SpecError): pass class SpecUnknowHeaderError(SpecError): pass HEADERS = ( 'package', 'description', 'prep', 'build', 'install', 'clean', 'check', 'preun', 'pre', 'postun', 'post', 'files', 'changelog' ) SINGLES = ( 'Summary', 'Name', 'Version', 'Release', 'Epoch', 'URL', 'Url', 'Group', 'BuildArch', 'AutoReq', 'AutoProv', 'AutoReqProv', 'Autoreq', 'Autoprov', 'Autoreqprov', 'ExclusiveArch', 'Prefix', 'License' ) REQUIRES = ('BuildRequires', 'Requires', 'Requires(post)', 'Requires(postun)', 'Requires(pre)', 'PreRequires', 'PreReq', 'Prereq', # alias in old spec 'Requires(preun)', 'Provides', 'Obsoletes', 'Conflicts', 'BuildConflicts', ) SKIPS = ( 'BuildRoot',) # must have keys for 'main' package MUSTHAVE = {'Release': '1', } # state definition of parser ( ST_DEFINE, ST_MAIN, ST_INLINE, ST_SUBPKG, ) = range(4) class SpecConvertor(Convertor): """ Convertor for SpecBuild ini files """ def __init__(self): sb_cv_table = { 'BuildRequires': 'PkgBR', 'pre': 'install-pre', 'description': 'Description', 'Requires(post)': 'RequiresPost', 'Requires(postun)': 'RequiresPostUn', 'Requires(pre)': 'RequiresPre', 'PreRequires': 'RequiresPre', 'PreReq': 'RequiresPre', 'Prereq': 'RequiresPre', 'Requires(preun)': 'RequiresPreUn', 'Url': 'URL', 'Autoreq': 'AutoReq', 'Autoprov': 'AutoProv', 'Autoreqprov': 'AutoReqProv', } Convertor.__init__(self, sb_cv_table) class SpecParser(object): """ Parser of SPEC file of rpm package """ def __init__(self, replace_macros, builder_parsing, include_files): # runtime variables self.items = {} self.table = {} self.cur_pkg = 'main' self.include_files = include_files self.builder_parsing = builder_parsing self._Builder = None self._Configure = None self.replace_macros = replace_macros self.macros = [] def _switch_subpkg(self, subpkg, create=False): # whether '-n subpkg'? wholename = False ls = subpkg.split() if '-n' in ls: try: subpkg = ls[ls.index('-n')+1] wholename = True except IndexError: raise SpecFormatError(subpkg) else: subpkg = ls[0] subpkg_new = 'SubPackages' not in self.items or subpkg not in self.items['SubPackages'] if subpkg_new and not create: logger.warning(' un-declared subpkg %s found in spec' % subpkg) return None if subpkg_new: if 'SubPackages' not in self.items: self.items['SubPackages'] = {} if subpkg not in self.items['SubPackages']: self.items['SubPackages'][subpkg] = {} if wholename: self.items['SubPackages'][subpkg]['AsWholeName'] = True # switch self.cur_pkg = subpkg return self.items['SubPackages'][subpkg] def _do_package(self, items, pkg, h, v): # skip pass def _do_prep(self, items, pkg, h, v): logger.info(' the following is the content of PREP in original spec, please compare them with the generated carefully: \n%s' % v) def _do_build(self, items, pkg, h, v): """ to handle build script: trying to find out the most of the generic cases """ def _save_raw_in_post(items, lines): # make sure no 'make' generated auto items['Configure'] = 'none' items['Builder'] = 'none' # put all script to 'post install' items['extra']['PostMakeExtras'] = lines ### Sub START lines = v.splitlines() if lines[0].startswith('-'): lines.pop(0) if not self.builder_parsing: _save_raw_in_post(items, lines) return # parts of build script (PRE, POST_CFG, POST_BUILD) = range(3) parts = { 'pre': [], 'post': [] } cur_part = PRE cont_line = False for line in lines: if cont_line: whole_line = whole_line + ' ' + line.strip() else: if not line.strip() or line.startswith('#'): # empty line or comment line, skip continue whole_line = line.strip() if line[-1:] == '\\': cont_line = True whole_line = whole_line[:-1].strip() continue else: cont_line = False found_cfgr = False found_bldr = False # find configure in current line for cfgr in ('configure', 'reconfigure', 'autogen'): pieces = whole_line.split() if cfgr in pieces or '%'+cfgr in pieces: found_cfgr = True self._Configure = cfgr cfgr_line = whole_line[len(cfgr)+1:].strip() break # find builder in current line if re.match('^(%\{__)?make', whole_line): found_bldr = True self._Builder = 'make' elif re.search('python\W+setup.py\W+build', whole_line): found_bldr = True self._Builder = 'python' if cur_part == PRE: if found_cfgr: cur_part = POST_CFG elif found_bldr: cur_part = POST_BUILD else: parts['pre'].append(whole_line) elif cur_part == POST_CFG: if found_cfgr: # more 'configr', wrong cur_part = PRE break elif found_bldr: cur_part = POST_BUILD else: # another line(s) between configr and buildr, wrong # or no supported buildr found, wrong cur_part = PRE break elif cur_part == POST_BUILD: parts['post'].append(whole_line) if cur_part == PRE: # means match failed _save_raw_in_post(items, lines) else: if self._Configure: items['Configure'] = self._Configure # parse the configure options opts = map(lambda s: '--'+s, [opt for opt in map(str.strip, cfgr_line.split('--')) if opt]) if opts: items['ConfigOptions'] = opts else: # no configure found, only need builder items['Configure'] = 'none' if self._Builder: items['Builder'] = self._Builder if parts['pre']: items['extra']['PreMakeExtras'] = parts['pre'] if parts['post']: items['extra']['PostMakeExtras'] = parts['post'] def _do_install(self, items, pkg, h, v): """ to handle install script: trying to find out the most of the generic cases """ lines = v.splitlines() if lines[0].startswith('-'): lines.pop(0) # try to search %find_lang filter_lines = [] for line in lines: if line.startswith('%find_lang'): m = re.compile('^%find_lang\s+(.*)\s*').match(line) if m: parts = m.group(1).split() if '||' in parts: parts = parts[:parts.index('||')] items['LocaleName'] = parts.pop(0) if parts: items['LocaleOptions'] = parts continue filter_lines.append(line) lines = filter_lines parts = { 'pre': [], 'post': [] } if self._Builder == 'make': re_installer = re.compile('make[_ \t]*install') elif self._Builder == 'python': re_installer = re.compile('python\W+setup.py\W+install') re_cleanup = re.compile('(rm|\%\{__rm\})\W+-rf\W+(\$RPM_BUILD_ROOT|\%\{buildroot\})') if self._Builder: # have found 'Builder' in build scripts found_insaller = False for line in lines: if not found_insaller: if re_installer.search(line): found_insaller = True elif re_cleanup.search(line): # skip cleanup line pass else: parts['pre'].append(line) else: parts['post'].append(line) if found_insaller: if parts['pre']: items['extra']['PreMakeInstallExtras'] = parts['pre'] if parts['post']: items['extra']['PostMakeInstallExtras'] = parts['post'] return # false safe case items['extra']['PostMakeInstallExtras'] = lines def _do_clean(self, items, pkg, h, v): # skip pass def _do_check(self, items, pkg, h, v): items['extra']['check'] = v.strip() items['Check'] = True def _parse_prog_in_opt(self, header): ls = header.split() if '-p' in ls: try: return ls[ls.index('-p')+1] except IndexError: raise SpecFormatError(h) else: return '' def _do_extra_scripts(self, items, h, v): section = h.split()[0][1:] items['extra'][section] = v.strip().splitlines() inline_prog = self._parse_prog_in_opt(h) if inline_prog: items['extra'][section].insert(0, inline_prog) def _do_pre(self, items, pkg, h, v): self._do_extra_scripts(items, h, v) def _do_preun(self, items, pkg, h, v): self._do_extra_scripts(items, h, v) def _do_post(self, items, pkg, h, v): self._do_extra_scripts(items, h, v) def _do_postun(self, items, pkg, h, v): self._do_extra_scripts(items, h, v) def _do_changelog(self, items, pkg, h, v): logger.warning(' Please move changelog in %changelog to *.changes file.') def _remove_attrs(self, files): # try to remove duplicate '%defattr' in files list dup = '%defattr(-,root,root,-)' dup2 = '%defattr(-,root,root)' if dup in files: files.remove(dup) if dup2 in files: files.remove(dup2) def _do_files(self, items, pkg, h, v): files = map(str.strip, v.strip().splitlines()) if files: # skip option line if files[0].startswith('-'): files.pop(0) self._remove_attrs(files) if self.include_files: items['Files'] = files else: items['extra']['Files'] = files def _do_description(self, items, pkg, h, v): items['Description'] = v.strip() def read(self, filename): """ read in all recognized directives and headers """ comment = re.compile('^#.*') directive = re.compile('^([\w()]+):[ \t]*(.*)') define_re = re.compile('^%(define|global)\s+(\w+)\s+(.*)') header_re = re.compile('^%(' + '|'.join(HEADERS) + ')\s*(.*)') state = ST_DEFINE items = self.items for line in file(filename): if state == ST_DEFINE: line = line.strip() if not line or comment.match(line): # skip comment line and empty line continue m = define_re.match(line) if m: if self.replace_macros: self.table[m.group(2)] = m.group(3) else: self.macros.append(line) continue #short-cut else: state = ST_MAIN # fall through if state == ST_INLINE: if header_re.match(line): state = ST_MAIN # fall through else: if items: items[cur_block] += line continue if state == ST_MAIN: line = line.strip() if not line or comment.match(line): # skip comment line and empty line continue dm = directive.match(line) if not dm: hm = header_re.match(line) if dm: key = dm.group(1) val = dm.group(2) # special case for Source and Patch if key.startswith('Source'): key = 'Sources' elif key.startswith('Patch'): key = 'Patches' if key not in items: items[key] = [val] else: items[key].append(val) elif hm: header = hm.group(1) opt = hm.group(2) if header not in HEADERS: raise SpecUnknowHeaderError(state, self.cur_pkg, header) if header == 'package': if not opt: raise SpecFormatError(line) items = self._switch_subpkg(opt, True) else: # inline sections of other headers state = ST_INLINE if opt and (not opt.startswith('-') or '-n' in opt): # section with sub-pkg specified items = self._switch_subpkg(opt) else: # for 'main' package items = self.items if items: cur_block = header if cur_block not in items: items[cur_block] = line+'\n' """ # options in header line as the first line if ' -' in line: items[cur_block] = line[line.index(' -'):] + '\n' """ else: # unparsed line known_skips = ('python_sitelib', 'python_sitearch') msg = True for skip in known_skips: if skip in line: msg = False break if msg: logger.warning(' un-parsed spec line skipped: %s' % line) def cooked_items(self): """ return all items, cooked to the input of convertor """ return self._cook_items('main', self.items) def _cook_items(self, pkg_name, items): """ helper function to transfer data structure """ # pattern of macros macro_re = re.compile('%{(\w+)}') ck_items = {'extra': {}} if pkg_name != 'main': ck_items['Name'] = pkg_name for k, v in items.iteritems(): if k in SKIPS or k in HEADERS or k == 'SubPackages': continue if self.table: # macro replacing nv = [] for vi in v: while macro_re.search(vi): nvi = vi for m in macro_re.finditer(vi): macro, name = m.group(0, 1) if name in self.table: nvi = nvi.replace(macro, self.table[name]) if vi == nvi: break # break to exit 'while' loop vi = nvi # now nvi is the replaced string nv.append(vi) v = nv if k in SINGLES: # special case for Release if k == 'Release': m = re.match('(\S+)%{\?dist}', v[0]) if m: ck_items[k] = m.group(1) else: ck_items[k] = v[0] else: ck_items[k] = v[0] elif k in REQUIRES: nbr = [] # new 'PkgConfigBR' list nv = [] for vi in v: if 'perl' in vi: nv.append(vi) elif ',' in vi: reqs = [] for entry in re.findall('\S+\s+[<>=]+\s+[^,\s]+|[^,\s]+', vi): reqs.append(entry) nv += reqs elif ' ' in vi: reqs = [] for entry in re.findall('\S+\s+[<>=]+\s+\S+|\S+', vi): reqs.append(entry) nv += reqs else: nv.append(vi) if 'pkgconfig' in vi and k == 'BuildRequires': for nvi in nv: pkgbr = re.sub(r'pkgconfig\s*\(\s*([^\)]*)\s*\)', r'\1', nvi) if pkgbr != nvi: nbr.append(pkgbr) nv.remove(nvi) ck_items[k] = nv if nbr: ck_items['PkgConfigBR'] = nbr else: ck_items[k] = v # handle all sectinos with header, IN-ORDER for hdr in HEADERS: if hdr in items: routine = getattr(self, '_do_' + hdr) hdr_line, Drop, content = items[hdr].partition('\n') routine(ck_items, pkg_name, hdr_line, content) if pkg_name != 'main': # shortcut for subpkg return ck_items # handle subpackages if 'SubPackages' in items: ck_items['SubPackages'] = [] for sub, sub_items in items['SubPackages'].iteritems(): ck_items['SubPackages'].append(self._cook_items(sub, sub_items)) # check must-have keys for key, default in MUSTHAVE.iteritems(): if key not in ck_items: ck_items[key] = default # check for global macros if self.macros: ck_items['extra']['macros'] = self.macros return ck_items def parse_options(args): import spectacle.__version__ usage = "Usage: %prog [options] [spec-path]" parser = optparse.OptionParser(usage, version=spectacle.__version__.VERSION) parser.add_option("-o", "--output", type="string", dest="outfile_path", default=None, help="Path of output yaml file") parser.add_option("-r", "--replace-macros", action="store_true", dest="replace_macros", default=False, help="To replace self-defined macros in spec file") parser.add_option("", "--no-builder-parsing", action="store_false", dest="builder_parsing", default=True, help="Do NOT try to parse build/install scripts") parser.add_option("-f", "--include-files", action="store_true", dest="include_files", default=False, help="To store files list in YAML file") return parser.parse_args() def check_yaml_file(spec_fpath): specDir = os.path.dirname(spec_fpath) if not specDir: specDir = os.path.curdir yaml_s = glob.glob('*.yaml') if yaml_s: answer = logger.ask(""""*.yaml" file(s) exists in working dir: %s Maybe this package has been converted to spectacle enabled one. Continue?""" % ' '.join(yaml_s), False) if not answer: sys.exit(1) def check_ini_file(spec_fpath): specDir = os.path.dirname(spec_fpath) if not specDir: specDir = os.path.curdir ini_s = glob.glob('*.ini') if ini_s: answer = logger.ask(""""*.ini" file(s) exists in working dir: %s If being spec-builder file(s), please use ini2spectacle to convert. Continue?""" % ' '.join(ini_s), False) if not answer: sys.exit(1) def check_spec_file(spec_fpath): heads = """# # Do not Edit! Generated by: # spectacle version """ new_heads = """# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version """ fcont = file(spec_fpath).read() if fcont.startswith(heads) or fcont.startswith(new_heads): logger.error(' Input spec file is a spectacle generated one, do NOT convert it again.') if __name__ == '__main__': """ Main Function """ (options, args) = parse_options(sys.argv[1:]) if not args: # no spec-path specified, search in CWD specls = glob.glob('*.spec') if not specls: logger.error(' Cannot find valid spec file in current directory, please specify one.') elif len(specls) > 1: logger.error(' Find multiple spec files in current directory, please specify one.') spec_fpath = specls[0] else: spec_fpath = args[0] # Check if YAML file exists check_yaml_file(spec_fpath) # Check if spec-build's INI file exists check_ini_file(spec_fpath) # Check if the input file exists if not os.path.exists(spec_fpath): # input file does not exist logger.error(" %s: File does not exist" % spec_fpath) # Check if spec file is spectacle generated one check_spec_file(spec_fpath) # check the working path if spec_fpath.find('/') != -1 and os.path.dirname(spec_fpath) != os.path.curdir: wdir = os.path.dirname(spec_fpath) logger.info(' Changing to working dir: %s' % wdir) os.chdir(wdir) spec_fname = os.path.basename(spec_fpath) if options.outfile_path: out_fpath = options.outfile_path else: if spec_fname.endswith('.spec'): out_fpath = spec_fname[:-4] + 'yaml' else: out_fpath = spec_fname + '.yaml' """Read the input file""" spec_parser = SpecParser(replace_macros = options.replace_macros, builder_parsing = options.builder_parsing, include_files = options.include_files ) try: spec_parser.read(spec_fname) except SpecFormatError, e: logger.warning(' Spec syntax error: %s' % str(e)) except SpecUnknowHeaderError, e: logger.warning(' Unknown spec header: %s' % str(e)) convertor = SpecConvertor() """Dump them to spectacle file""" dumper = SpectacleDumper(format='yaml', opath = out_fpath) newspec_fpath = dumper.dump(convertor.convert(spec_parser.cooked_items())) logger.info(' Yaml file %s created' % out_fpath) if newspec_fpath: bak_spec_fpath = os.path.join('spec.backup', newspec_fpath) logger.info(' New spec file %s was generated by new yaml file,' % newspec_fpath) logger.info(' and orignal spec file was saved as %s' % bak_spec_fpath) spectacle-0.22/tools/specify000077500000000000000000000151011153164731700161360ustar00rootroot00000000000000#!/usr/bin/python -tt # vim: ai ts=4 sts=4 et sw=4 # Copyright (c) 2009 Intel Corporation # # 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; version 2 of the License # # 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., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. from __future__ import with_statement import os,sys import optparse import glob from spectacle import specify from spectacle import logger MF_TEMPLATE = """PKG_NAME := %s SPECFILE = $(addsuffix .spec, $(PKG_NAME)) YAMLFILE = $(addsuffix .yaml, $(PKG_NAME)) include /usr/share/packaging-tools/Makefile.common """ def new_yaml(fpath): from spectacle import dumper if not fpath.endswith('.yaml'): fpath += '.yaml' autokeys = list(specify.MAND_KEYS) + ['Sources', 'Requires', 'PkgBR', 'PkgConfigBR'] items = [] for key in autokeys: if key in specify.STR_KEYS: items.append((key, '^^^')) elif key in specify.LIST_KEYS: items.append((key, ['^^^'])) dumper = dumper.SpectacleDumper(format='yaml', opath = fpath) dumper.dump(items) # append comments with open(fpath, 'a') as f: f.write("""# Please replace all "^^^" with valid values, or remove the unused keys. # And cleanup these comments lines for the best. """) logger.info('New spectacle yaml file created: %s' % fpath) if logger.ask('Continue to edit the new file?'): if 'EDITOR' in os.environ: editor = sys.environ['EDITOR'] else: editor = 'vi' os.system('%s %s' % (editor, fpath)) def new_subpkg(fpath, sub): def _has_subs(path): import re with open(path) as f: lines = f.read() if re.search('^SubPackages:', lines, re.M): return True else: return False if _has_subs(fpath): str_sub = '\n' else: str_sub = '\nSubPackages:\n' str_sub +=""" - Name: %s Summary: ^^^ Group: ^^^ # Please replace all "^^^" with valid values, and cleanup this comment line. """ % sub with open(fpath, 'a') as f: f.write(str_sub) def parse_options(args): import spectacle.__version__ usage = "Usage: %prog [options] [yaml-path]" parser = optparse.OptionParser(usage, version=spectacle.__version__.VERSION) parser.add_option("-o", "--output", type="string", dest="outfile_path", default=None, help="Path of output spec file") parser.add_option("-s", "--skip-scm", action="store_true", dest="skip_scm", default=False, help="Skip to check upstream SCM when specified in YAML") parser.add_option("-N", "--not-download", action="store_true", dest="not_download", default=False, help="Do not try to download newer source files") parser.add_option("-n", "--non-interactive", action="store_true", dest="noninteractive", default=False, help="Non interactive running, to use default answers") parser.add_option("", "--new", type="string", dest="newyaml", default=None, help="Create a new yaml from template") parser.add_option("", "--newsub", type="string", dest="newsub", default=None, help="Append a new sub-package to current yaml") return parser.parse_args() if __name__ == '__main__': """ Main Function """ (options, args) = parse_options(sys.argv[1:]) if options.noninteractive: logger.set_mode(False) if options.newyaml: if glob.glob('*.yaml'): if not logger.ask('Yaml file found in current dir, continue to create a new one?', False): sys.exit(0) elif glob.glob('*.spec'): if not logger.ask('Spec file found in current dir, maybe you need spec2spectacle to convert it, continue?', False): sys.exit(0) new_yaml(options.newyaml) sys.exit(0) if not args: # no YAML-path specified, search in CWD yamlls = glob.glob('*.yaml') if not yamlls: logger.error('Cannot find valid spectacle file(*.yaml) in current directory, please specify one.') elif len(yamlls) > 1: logger.error('Find multiple spectacle files(*.yaml) in current directory, please specify one.') yaml_fpath = yamlls[0] else: yaml_fpath = args[0] # check if the input file exists if not os.path.isfile(yaml_fpath): # input file does not exist logger.error("%s: File does not exist" % yaml_fpath) if options.newsub: new_subpkg(yaml_fpath, options.newsub) logger.info('Yaml file: %s has been appended with new subpkg: %s' % (yaml_fpath, options.newsub)) sys.exit(0) if options.outfile_path: if os.path.sep in options.outfile_path: out_fpath = os.path.abspath(options.outfile_path) else: out_fpath = options.outfile_path else: # %{name}.spec as the default if not specified out_fpath = None # check the working path if yaml_fpath.find(os.path.sep) != -1 and os.path.dirname(yaml_fpath) != os.path.curdir: wdir = os.path.dirname(yaml_fpath) logger.info('Changing to working dir: %s' % wdir) os.chdir(wdir) yaml_fname = os.path.basename(yaml_fpath) # check Makefile from packaging-tools if not os.path.exists('Makefile'): logger.warning('There is no "Makefile" for this package, please update it using packaging-tools') if logger.ask('Need to create Makefile from default template?', False): mf = open('Makefile', 'w') mf.write(MF_TEMPLATE % os.path.basename(yaml_fname).rstrip('.yaml')) mf.close() spec_fpath, newspec = specify.generate_rpm(yaml_fname, spec_fpath=out_fpath, download_new=not options.not_download, skip_scm=options.skip_scm) if newspec: logger.warning("NEW spec file created: %s, maybe customized spec content is needed!" % spec_fpath) else: logger.info("Old spec file exists, patching %s ..." % spec_fpath)