Fri, 03 Aug 2012 20:11:53 +0200
Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.
michael@112 | 1 | ## |
michael@112 | 2 | ## mtasc.spec -- OpenPKG RPM Package Specification |
michael@112 | 3 | ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@112 | 4 | ## |
michael@112 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@112 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@112 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@112 | 8 | ## copies. |
michael@112 | 9 | ## |
michael@112 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@112 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@112 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@112 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@112 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@112 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@112 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@112 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@112 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@112 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@112 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@112 | 21 | ## SUCH DAMAGE. |
michael@112 | 22 | ## |
michael@112 | 23 | |
michael@112 | 24 | # package version |
michael@112 | 25 | %define V_release 1.14 |
michael@112 | 26 | %define V_snapshot 20080901 |
michael@112 | 27 | |
michael@112 | 28 | # package information |
michael@112 | 29 | Name: mtasc |
michael@112 | 30 | Summary: Motion-Twin ActionScript Compiler |
michael@112 | 31 | URL: http://mtasc.org/ |
michael@112 | 32 | Vendor: Nicolas Cannasse, Motion Twin |
michael@112 | 33 | Packager: OpenPKG Foundation e.V. |
michael@112 | 34 | Distribution: OpenPKG Community |
michael@112 | 35 | Class: EVAL |
michael@112 | 36 | Group: Flash |
michael@112 | 37 | License: GPL/BSD |
michael@112 | 38 | Version: %{V_release}.%{V_snapshot} |
michael@113 | 39 | Release: 20090106 |
michael@112 | 40 | |
michael@112 | 41 | # list of sources |
michael@112 | 42 | Source0: ftp://ftp.openpkg.org/sources/CPY/mtasc/mtasc-%{V_snapshot}.tar.bz2 |
michael@112 | 43 | Source1: mtasc.sh |
michael@112 | 44 | Patch0: mtasc.patch |
michael@112 | 45 | |
michael@112 | 46 | # build information |
michael@112 | 47 | Prefix: %{l_prefix} |
michael@112 | 48 | BuildRoot: %{l_buildroot} |
michael@113 | 49 | BuildPreReq: OpenPKG, openpkg >= 20060823, zlib, ocaml |
michael@113 | 50 | PreReq: OpenPKG, openpkg >= 20060823, zlib |
michael@112 | 51 | AutoReq: no |
michael@112 | 52 | AutoReqProv: no |
michael@112 | 53 | |
michael@112 | 54 | %description |
michael@112 | 55 | MTASC is a free ActionScript 2 compiler and the predecessor to |
michael@112 | 56 | haXe. It can compile large number of ActionScript .as class files |
michael@112 | 57 | in a very short time and generate directly the corresponding .swf |
michael@112 | 58 | bytecode files without relying on Macromedia Flash or other tools. |
michael@112 | 59 | |
michael@112 | 60 | %track |
michael@112 | 61 | prog mtasc = { |
michael@112 | 62 | version = %{V_release} |
michael@112 | 63 | url = http://mtasc.org/ |
michael@112 | 64 | regex = mtasc-(__VER__)\.zip |
michael@112 | 65 | } |
michael@112 | 66 | |
michael@112 | 67 | %prep |
michael@112 | 68 | %setup -q -n mtasc |
michael@112 | 69 | %patch -p0 |
michael@113 | 70 | %{l_shtool} subst \ |
michael@113 | 71 | -e "s;\(let c_opts = .*-ccopt\);\1 -I %{l_prefix}/include;" \ |
michael@113 | 72 | -e "s;\(let c_opts = .* else \"\);\1 -I %{l_prefix}/include;" \ |
michael@113 | 73 | install.ml |
michael@128 | 74 | %{l_shtool} subst \ |
michael@128 | 75 | -e 's;mtasc.exe;mtasc;g' \ |
michael@128 | 76 | ocaml/mtasc/mtasc.dsp \ |
michael@128 | 77 | ocaml/mtasc/main.ml |
michael@112 | 78 | |
michael@112 | 79 | %build |
michael@112 | 80 | %{l_prefix}/bin/ocaml install.ml |
michael@112 | 81 | |
michael@112 | 82 | %install |
michael@112 | 83 | rm -rf $RPM_BUILD_ROOT |
michael@112 | 84 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@112 | 85 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@112 | 86 | $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc |
michael@112 | 87 | for tool in mtasc mtasc-byte; do |
michael@112 | 88 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@112 | 89 | -e "s;@tool@;$tool;" \ |
michael@112 | 90 | %{SOURCE mtasc.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/$tool |
michael@112 | 91 | done |
michael@112 | 92 | %{l_shtool} install -c -s -m 755 \ |
michael@112 | 93 | bin/mtasc bin/mtasc-byte \ |
michael@112 | 94 | $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc/ |
michael@112 | 95 | find ocaml/mtasc -name CVS -type d -print | xargs rm -rf |
michael@112 | 96 | cp -rp ocaml/mtasc/std* $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc/ |
michael@112 | 97 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@112 | 98 | |
michael@112 | 99 | %files -f files |
michael@112 | 100 | |
michael@112 | 101 | %clean |
michael@112 | 102 | rm -rf $RPM_BUILD_ROOT |
michael@112 | 103 |