#!/bin/sh

name="SDL"
title="SDL"
package="SDL"
version="1.2.5"
build="1"
noarch="n"
build_info="Standard build."

info_pl="SDL - przenosna biblioteka dla multimediow. Oferuje niskopoziomowy
dostep do wyjsc wideo i audio, klawiatury i myszy. Wykorzystywana przez
wiele gier i programow multimedialnych."
info="SDL - portable multimedia library. It offers low level access to video
and audio out, keybord and mouse. It is used by many games and multimedia 
programs."
desc="Simple DirectMedia Layer."
desc_pl="Simple DirectMedia Layer."
category="System/Library"
environment="X11"
contact="packages@intersec.pl"
vendor="Packware Project"
vendor_id="pw"

# Other packages required by the package (not because of needed libraries).
requires=""
# Other packages that the package can replace.
obsoletes=""
# Other packages that conflicts with the package.
conflicts=""

# Files to copy from sources directory.
docs_source="BUGS,COPYING,CREDITS,INSTALL,README*,TODO,WhatsNew,docs.html,docs/"
# Files to copy from directory with .builder.
docs_cwd=""

# Strip all binaries.
strip_bin="y"
# Set files ownings to root.root.
reset_own="y"
# Set directories modes to 755.
reset_dir="y"
# Set files modes to 755 and 644
reset_fil="y"
# Delete formatted man pages.
delete_cat="y"

# Don't remove the line below.
. /usr/src/tgz/lib/builder.defs

# Unpack sources here (add_source).
#add_source http://www.libsdl.org/release/$name-$version.tar.gz
add_source SDL-1.2.5.tar.gz

# Ask user for compile-time options here.
# Change file mode with function change_mod (format of mode is the same as in
# chmod command):
# change_mod package file mode

# Change file owner with function change_own (format of mode is the same as in
# chown command):
# change_own package file user.group

# Constant options for ./configure script (configure_option).
configure_option --prefix=/usr
configure_option --with-x
configure_option --enable-video-x11-vm
configure_option --enable-video-fbcon
configure_option --enable-video-svga
configure_option --enable-alsa

# Warning! --host=$architecture-pc-linux-gnu is passed to ./configure by
# default. Use build_host_off to turn it off.
# build_host_off

# Constant options for make (make_option).

# Constant options for make install (install_option).
install_option DESTDIR=$pkg_main

# Don't remove the two lines below.
parent_package="$package"
write_info main

# Change to sources directory that we will be operating on.
cd $src1

# Run configure script with options as given by function configure_option.
do_configure
# Run make with options as given by function make_option.
do_make
# Run make install with options as given by function install_option.
do_install

# Copy files passed by src_docs and cwd_docs variables to usr/doc/name-version.
make_docs

# Define subpackages here (subpackage).

# Create packages (main and subpackages defined earlier).
make_package main

# Remove temporary directory.
clean_up
