michael@112: ## michael@112: ## mtasc.spec -- OpenPKG RPM Package Specification michael@112: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@112: ## michael@112: ## Permission to use, copy, modify, and distribute this software for michael@112: ## any purpose with or without fee is hereby granted, provided that michael@112: ## the above copyright notice and this permission notice appear in all michael@112: ## copies. michael@112: ## michael@112: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@112: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@112: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@112: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@112: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@112: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@112: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@112: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@112: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@112: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@112: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@112: ## SUCH DAMAGE. michael@112: ## michael@112: michael@112: # package version michael@112: %define V_release 1.14 michael@112: %define V_snapshot 20080901 michael@112: michael@112: # package information michael@112: Name: mtasc michael@112: Summary: Motion-Twin ActionScript Compiler michael@112: URL: http://mtasc.org/ michael@112: Vendor: Nicolas Cannasse, Motion Twin michael@112: Packager: OpenPKG Foundation e.V. michael@112: Distribution: OpenPKG Community michael@112: Class: EVAL michael@112: Group: Flash michael@112: License: GPL/BSD michael@112: Version: %{V_release}.%{V_snapshot} michael@112: Release: 20080914 michael@112: michael@112: # list of sources michael@112: Source0: ftp://ftp.openpkg.org/sources/CPY/mtasc/mtasc-%{V_snapshot}.tar.bz2 michael@112: Source1: mtasc.sh michael@112: Patch0: mtasc.patch michael@112: michael@112: # build information michael@112: Prefix: %{l_prefix} michael@112: BuildRoot: %{l_buildroot} michael@112: BuildPreReq: OpenPKG, openpkg >= 20060823, ocaml michael@112: PreReq: OpenPKG, openpkg >= 20060823 michael@112: AutoReq: no michael@112: AutoReqProv: no michael@112: michael@112: %description michael@112: MTASC is a free ActionScript 2 compiler and the predecessor to michael@112: haXe. It can compile large number of ActionScript .as class files michael@112: in a very short time and generate directly the corresponding .swf michael@112: bytecode files without relying on Macromedia Flash or other tools. michael@112: michael@112: %track michael@112: prog mtasc = { michael@112: version = %{V_release} michael@112: url = http://mtasc.org/ michael@112: regex = mtasc-(__VER__)\.zip michael@112: } michael@112: michael@112: %prep michael@112: %setup -q -n mtasc michael@112: %patch -p0 michael@112: michael@112: %build michael@112: %{l_prefix}/bin/ocaml install.ml michael@112: michael@112: %install michael@112: rm -rf $RPM_BUILD_ROOT michael@112: %{l_shtool} mkdir -f -p -m 755 \ michael@112: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@112: $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc michael@112: for tool in mtasc mtasc-byte; do michael@112: %{l_shtool} install -c -m 755 %{l_value -s -a} \ michael@112: -e "s;@tool@;$tool;" \ michael@112: %{SOURCE mtasc.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/$tool michael@112: done michael@112: %{l_shtool} install -c -s -m 755 \ michael@112: bin/mtasc bin/mtasc-byte \ michael@112: $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc/ michael@112: find ocaml/mtasc -name CVS -type d -print | xargs rm -rf michael@112: cp -rp ocaml/mtasc/std* $RPM_BUILD_ROOT%{l_prefix}/lib/mtasc/ michael@112: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@112: michael@112: %files -f files michael@112: michael@112: %clean michael@112: rm -rf $RPM_BUILD_ROOT michael@112: