| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- ##
- ## io.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_opkg 20070528
- %define V_dist 2007-05-28
- # package information
- Name: io
- Summary: IO Programming Language
- URL: http://www.iolanguage.com/
- Vendor: Steve Dekorte
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: Language
- License: BSD
- Version: %{V_opkg}
- Release: 20070531
- # package options
- %option with_threads no
- %option with_zlib no
- %option with_libxml no
- %option with_sqlite no
- # list of sources
- Source0: http://io.urbanape.com/release/Io-%{V_dist}.zip
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, make, infozip
- PreReq: OpenPKG, openpkg >= 20040130
- %if "%{with_zlib}" == "yes"
- BuildPreReq: zlib
- PreReq: zlib
- %endif
- %if "%{with_libxml}" == "yes"
- BuildPreReq: libxml
- PreReq: libxml
- %endif
- %if "%{with_sqlite}" == "yes"
- BuildPreReq: sqlite
- PreReq: sqlite
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Io is a small, prototype-based programming language. The ideas
- in Io are mostly inspired by Smalltalk (all values are objects),
- Self (prototype-based), NewtonScript (differential inheritance),
- Act1 (actors and futures for concurrency), LISP (code is a runtime
- inspectable/modifiable tree) and Lua (small, embeddable).
- %track
- prog io = {
- version = %{V_dist}
- url = http://www.iolanguage.com/downloads/
- regex = Io-(__VER__)\.zip
- }
- %prep
- %setup -q -T -c
- %{l_prefix}/bin/unzip -q -x %{SOURCE0}
- %build
- # prepare addon directory
- ( cd Io-%{V_dist}/addons
- addons=""
- addons="$addons BigNum Blowfish CGI ContinuedFraction Contracts MD5 Random"
- addons="$addons Rational Regex SHA1 SystemCall Socket User Vector"
- %if "%{with_threads}" == "yes"
- addons="$addons Thread"
- %endif
- %if "%{with_zlib}" == "yes"
- addons="$addons Zlib"
- %endif
- %if "%{with_libxml}" == "yes"
- addons="$addons Libxml2"
- %endif
- %if "%{with_sqlite}" == "yes"
- addons="$addons SQLite3"
- %endif
- for addon in *; do mv $addon _$addon; done
- for addon in $addons; do mv _$addon $addon; done
- rm -rf _*
- ) || exit $?
- ( cd Io-%{V_dist}
- # build program and addons
- %{l_make} %{l_mflags -O} \
- INSTALL_PREFIX=%{l_prefix} \
- CC="%{l_cc} %{l_cflags -O} %{l_cppflags} -L_build/lib %{l_ldflags}"
- ) || exit $?
- %install
- # install program and addons
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/lib
- ( cd Io-%{V_dist}
- %{l_make} %{l_mflags} install \
- INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix}
- ) || exit $?
- # prune addon directory tree
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | grep "/_build/headers" | xargs rm -rf
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | grep "/_build/objs" | xargs rm -rf
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | grep "/_build/lib" | xargs rm -rf
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | grep "/tests" | xargs rm -rf
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | grep "/source" | xargs rm -rf
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type f -depth -print | grep "build.io" | xargs rm -f
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type f -depth -print | grep "depends" | xargs rm -f
- find $RPM_BUILD_ROOT%{l_prefix}/lib/io -type d -depth -print | xargs rmdir >/dev/null 2>&1 || true
- # prune executable
- mv $RPM_BUILD_ROOT%{l_prefix}/bin/io_static \
- $RPM_BUILD_ROOT%{l_prefix}/bin/io
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- # remove useless files
- rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libiovmall.*
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|