imported apps from testing

This commit is contained in:
Giuseppe 2011-02-26 14:58:38 +00:00
parent 4c9fe3f4ca
commit 95ddcc24f5
13 changed files with 1125 additions and 0 deletions

38
.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
_buildscripts
_repo
_sources
_temp
pkg
src
dbg
hdr
*~
build.sh
clean-builddir.sh
clean-workdir.sh
makepkg
pkgrels-decrease.sh
pkgrels-increase.sh
pkgrels-reset.sh
rebuildlist-build.sh
rebuildlist-generate.sh
repoclean-local.sh
repoclean-remote.sh
show-config.sh
show-pkglists.sh
sync-complete.sh
sync-down.sh
sync-up-nodb.sh
sync-up.sh
*-cfg.conf
*-makepkg.conf
*-pkgs.conf
user.conf
*.db.tar.*
*.pkg.tar.*
*.tar.*
*.log
*.log*

135
check-files.sh Executable file
View File

@ -0,0 +1,135 @@
#!/bin/bash
# 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, see <http://www.gnu.org/licenses/>
_script_name="check files"
_cur_repo=$(pwd | awk -F '/' '{print $NF}')
_needed_functions="config_handling helpers messages"
_build_arch="$_arch"
_sarch="x32"
[[ ${_arch} = *x*64* ]] && _sarch="x64"
# helper functions
for subroutine in ${_needed_functions} ; do
source _buildscripts/functions/${subroutine}
done
# Determine the sync folder
if [[ ${_cur_repo} = *-testing ]] && [[ ${_cur_repo} != lib32-testing ]] ; then
_sync_folder="_testing-${_sarch}/"
elif [[ ${_cur_repo} = *-unstable ]] ; then
_sync_folder="_unstable-${_sarch}/"
else
_sync_folder="_repo/remote/"
fi
title "${_script_name} - $_cur_repo"
check_configs
load_configs
check_rsync
check_accounts
sync_down()
{
msg "syncing down"
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder}
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/unstable/$_build_arch/* ${_sync_folder}
else
rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder}
fi
}
remove_packages()
{
# remove the package(s) from sync folder
msg "removing the packages(s) from ${_sync_folder}"
pushd ${_sync_folder} &>/dev/null
rm -rf ${remove_list}
popd &>/dev/null
}
sync_down
# Get the file list in the server
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
else
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | cut -d ":" -f 3 | cut -d " " -f 2`
fi
# Get the file list in sync folder
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] || [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 2`
else
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 3`
fi
# Get the list of files to remove
remove_list=""
for _file in ${local_files} ; do
file_exist="false"
for _compare_file in ${repo_files} ; do
if [ "${_file}" = "${_compare_file}" ] ; then
file_exist="true"
fi
done
if [ "${file_exist}" = "false" ] ; then
remove_list="${remove_list} ${_file}"
fi
done
if [ "${remove_list}" != "" ] ; then
msg "The following packages in _repo/remote don't exist in the sever:"
newline
echo "${remove_list}"
newline
question "Do you want to remove the package(s)? (y/n) "
while true ; do
read yn
case ${yn} in
[yY]* )
newline ;
remove_packages ;
break ;
;;
[nN]* )
newline ;
title "The files will be keeped..." ;
newline ;
break ;
;;
* )
echo "Enter (y)es or (n)o" ;
;;
esac
done
fi
title "All done"
newline

36
cppunit/PKGBUILD Normal file
View File

@ -0,0 +1,36 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=cppunit
pkgver=1.12.1
pkgrel=1
pkgdesc="A C++ unit testing framework"
arch=('i686' 'x86_64')
url="http://cppunit.sourceforge.net"
license=('LGPL')
depends=('sh' 'gcc-libs')
makedepends=('gcc')
options=('!libtool')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
'gcc4.5.patch')
md5sums=('bd30e9cf5523cdfc019b94f5e1d7fd19'
'7f4e3b50fa1ee8bc854ab431848dddec')
build() {
cd ${srcdir}/$pkgname-$pkgver
patch -Np1 -i ${srcdir}/gcc4.5.patch
autoreconf
libtoolize -f
./configure --prefix=/usr
make || return 1
}
package() {
cd ${srcdir}/$pkgname-$pkgver
make DESTDIR=${pkgdir} install || return 1
}

15
cppunit/gcc4.5.patch Normal file
View File

@ -0,0 +1,15 @@
--- cppunit-1.12.1.orig/src/cppunit/Makefile.am
+++ cppunit-1.12.1/src/cppunit/Makefile.am
@@ -63,5 +63,11 @@
libcppunit_la_LDFLAGS= \
-no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE)
+ -release $(LT_RELEASE) @LIBADD_DL@
+TESTS = t_link
+
+check_PROGRAMS = t_link
+
+t_link_SOURCES = t_link.cpp
+t_link_LDADD = libcppunit.la

47
freeimage/PKGBUILD Normal file
View File

@ -0,0 +1,47 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=freeimage
pkgver=3.15.0
pkgrel=1
pkgdesc="Library project for developers who would like to support popular graphics image formats."
arch=('i686' 'x86_64')
license=('GPL' 'custom:FIPL')
url="http://freeimage.sourceforge.net/"
depends=('gcc-libs')
makedepends=('hd2u')
source=("http://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
'gcc4.5_ln.patch')
md5sums=('3b4f08e4985b269beb29a2fced1ef888'
'f85279b2572a0a9e03775909cd9cd759')
build() {
cp -r FreeImage FreeImagefip
cd FreeImage
patch -Np1 < ${srcdir}/gcc4.5_ln.patch
make
cd ${srcdir}/FreeImagefip
patch -Np1 < ${srcdir}/gcc4.5_ln.patch
make -f Makefile.fip
}
package() {
cd FreeImage
make DESTDIR=${pkgdir} install
cd ${srcdir}/FreeImagefip
make -f Makefile.fip DESTDIR=${pkgdir} install
install -D -m644 ${srcdir}/FreeImage/license-fi.txt \
${pkgdir}/usr/share/licenses/${pkgname}/license-fi.txt
ln -s libfreeimage-${pkgver}.so ${pkgdir}/usr/lib/libfreeimage.so
ln -s libfreeimageplus-${pkgver}.so ${pkgdir}/usr/lib/libfreeimageplus.so
}

62
freeimage/gcc4.5_ln.patch Normal file
View File

@ -0,0 +1,62 @@
diff -Naur FreeImage.orig//Makefile.fip FreeImage.new//Makefile.fip
--- FreeImage.orig//Makefile.fip 2010-08-10 19:15:20.000000000 +0200
+++ FreeImage.new//Makefile.fip 2010-09-12 23:29:36.000000000 +0200
@@ -15,9 +15,9 @@
MODULES = $(SRCS:.c=.o)
MODULES := $(MODULES:.cpp=.o)
-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
+CFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
CXXFLAGS += $(INCLUDE)
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
diff -Naur FreeImage.orig//Makefile.gnu FreeImage.new//Makefile.gnu
--- FreeImage.orig//Makefile.gnu 2010-08-10 19:15:20.000000000 +0200
+++ FreeImage.new//Makefile.gnu 2010-09-12 23:01:57.000000000 +0200
@@ -15,9 +15,9 @@
MODULES = $(SRCS:.c=.o)
MODULES := $(MODULES:.cpp=.o)
-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
+CFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
CXXFLAGS += $(INCLUDE)
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
@@ -65,9 +65,6 @@
install -m 644 -o root -g root $(HEADER) $(INCDIR)
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
- ldconfig
clean:
rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
diff -Naur FreeImage.orig//Source/FreeImageToolkit/Background.cpp FreeImage.new//Source/FreeImageToolkit/Background.cpp
--- FreeImage.orig//Source/FreeImageToolkit/Background.cpp 2010-08-10 19:15:20.000000000 +0200
+++ FreeImage.new//Source/FreeImageToolkit/Background.cpp 2010-08-10 19:16:12.000000000 +0200
@@ -21,6 +21,7 @@
#include "FreeImage.h"
#include "Utilities.h"
+#include <limits.h>
/** @brief Determines, whether a palletized image is visually greyscale or not.
diff -Naur FreeImage.orig//Source/OpenEXR/Imath/ImathMatrix.h FreeImage.new//Source/OpenEXR/Imath/ImathMatrix.h
--- FreeImage.orig//Source/OpenEXR/Imath/ImathMatrix.h 2010-08-10 19:15:20.000000000 +0200
+++ FreeImage.new//Source/OpenEXR/Imath/ImathMatrix.h 2010-08-10 21:43:26.000000000 +0200
@@ -51,6 +51,7 @@
#include <iostream>
#include <iomanip>
+#include <cstring>
#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
// suppress exception specification warnings

33
intel-tbb/PKGBUILD Normal file
View File

@ -0,0 +1,33 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=intel-tbb
pkgver=3.0_20101215
pkgrel=1
pkgdesc='An award-winning C++ runtime library that abstracts the low-level threading details necessary for optimal multi-core performance.'
arch=('i686' 'x86_64')
url='http://www.threadingbuildingblocks.org/'
license=('GPL')
source=("http://www.threadingbuildingblocks.org/uploads/77/164/3.0%20Update%205/tbb30_20101215oss_src.tgz")
md5sums=('d1f65b7ba8bafda5a8616dfc8159ea05')
build() {
cd tbb${pkgver/\./}oss
make
}
package() {
cd tbb${pkgver/\./}oss
install -d ${pkgdir}/usr/lib
install -m755 build/linux_*/*.so* ${pkgdir}/usr/lib
install -d ${pkgdir}/usr/include
cp -pr include/tbb ${pkgdir}/usr/include
}

354
mvpkg.sh Executable file
View File

@ -0,0 +1,354 @@
#!/bin/bash
# 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, see <http://www.gnu.org/licenses/>
#
# (c) 2010 - Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# global vars
#
_script_name="Move Package(s)"
_ver="0.1"
_args=$(echo $1)
_dest_repo=$(echo $2)
_dest=$(echo "${_dest_repo}" | cut -d- -f2)
_cur_repo=$(pwd | awk -F '/' '{print $NF}')
_needed_functions="config_handling helpers messages"
_build_arch="$_arch"
_sarch="x32"
[[ ${_arch} = *x*64* ]] && _sarch="x64"
# helper functions
for subroutine in ${_needed_functions} ; do
source _buildscripts/functions/${subroutine}
done
# Determine the sync folder
if [[ ${_cur_repo} = *-testing ]] && [[ ${_cur_repo} != lib32-testing ]] ; then
_sync_folder="_testing-${_sarch}/"
elif [[ ${_cur_repo} = *-unstable ]] ; then
_sync_folder="_unstable-${_sarch}/"
else
_sync_folder="_repo/remote/"
fi
#
# Functions
#
exit_with_error()
{
newline
newline
error "failed performing the current operation, aborting..."
exit 1
}
sync_down()
{
msg "syncing down"
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} || exit_with_error
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/unstable/$_build_arch/* ${_sync_folder} || exit_with_error
else
rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} || exit_with_error
fi
}
check_files()
{
msg "Searching removed files"
# Get the file list in the server
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
else
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | cut -d ":" -f 3 | cut -d " " -f 2`
fi
# Get the file list in the sync folder
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] || [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 2`
else
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 3`
fi
remove_list=""
for parse_file in ${local_files} ; do
file_exist="false"
for compare_file in ${repo_files} ; do
if [ "${parse_file}" = "${compare_file}" ] ; then
file_exist="true"
fi
done
if [ "${file_exist}" = "false" ] ; then
remove_list="${remove_list} ${parse_file}"
fi
done
if [ "$remove_list" != "" ] ; then
msg "The following packages in ${_sync_folder} don't exist in the sever:"
newline
echo "${remove_list}"
newline
question "Do you want to remove the package(s)? (y/n)"
while true ; do
read yn
case ${yn} in
[yY]* )
newline ;
remove_packages "${remove_list}" ;
break
;;
[nN]* )
newline ;
title "The files will be keeped..." ;
newline ;
break
;;
* )
echo "Enter (y)es or (n)o"
;;
esac
done
fi
}
remove_packages()
{
# remove the package(s) from sync folder
msg "removing the packages(s) from ${_sync_folder}"
pushd $_sync_folder &>/dev/null
rm -vrf $1
popd &>/dev/null
}
get_source_repo()
{
unset _source_repo
_source_repo=$(tar xf ${_sync_folder}${1} .PKGINFO -O | grep 'gitrepo' | cut -d ' ' -f3 | cut -d- -f1)
}
sync_source()
{
# create new pacman database
newline
msg "creating «$(echo "${_cur_repo}" | cut -d- -f2)» database"
rm -rf ${_sync_folder}*.db.tar.*
pushd ${_sync_folder} &>/dev/null
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
repo-add testing.db.tar.gz *.pkg.*
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
repo-add unstable.db.tar.gz *.pkg.*
else
repo-add ${_cur_repo}.db.tar.gz *.pkg.*
fi
popd &>/dev/null
# sync local -> server, removing the packages
newline
msg "syncing «$(echo "${_cur_repo}" | cut -d- -f2)»"
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/ || exit_with_error
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/ || exit_with_error
else
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::${_rsync_dir} || exit_with_error
fi
}
upload_to_target()
{
newline
msg "uploading to «${final_dest}»"
rsync -avh --progress --delay-updates _temp/ ${_rsync_user}@${_rsync_server}::dev/${final_dest}/$_arch/ || exit_with_error
}
recreate_target_db()
{
newline
msg "performing remote operations in the server, this will take a bit, please wait ..."
curl "http://chakra-project.org/packages/recreate-database.php?r=${final_dest}&a=${_arch}&u=${_rsync_user}&p=${_rsync_pass}"
newline
}
clean_temp_folder()
{
newline
msg "cleanning the _temp folder"
pushd _temp &>/dev/null
rm -rf *
popd &>/dev/null
}
move_and_recreate_db()
{
clean_temp_folder
newline
msg "moving packages to _temp"
mv -v ${_sync_folder}${_pkgz_to_move} _temp
sync_source
upload_to_target
recreate_target_db
clean_temp_folder
}
move_packages()
{
# Move the packages to a proper repo
unset numb_packages
for np in ${_pkgz_to_move} ; do
((numb_packages++))
done
if [ "${_dest}" != "" ] ; then
unset repo_exist
for _repo_check in games apps desktop platform core lib32 lib32-testing testing unstable; do
if [ "${_repo_check}" == "${_dest}" ] ; then
repo_exist="yes"
fi
done
if [ "${repo_exist}" != "yes" ] ; then
newline
error "the target repo «${_dest}» it is unknown, aborting..."
newline
exit 1
fi
fi
if [[ $numb_packages > 1 ]] ; then
if [ "${_dest}" = "" ] ; then
newline
error "if you want to move more than one package at once you should specify the target repo, aborting..."
newline
exit 1
fi
final_dest=${_dest}
else
status_start "checking if the package contains target data"
get_source_repo "${_pkgz_to_move}"
if [ "${_source_repo}" == "" ] ; then
status_fail
if [ "${_dest}" == "" ] ; then
newline
error "this package does not contain the needed info for move it"
error "automatically, you should specify the target repo, aborting..."
newline
exit 1
else
final_dest=${_dest}
fi
else
status_ok
if [ "${_dest}" != "" ] ; then
if [ "${_dest}" != "${_source_repo}" ] ; then
msg "you supplied «${_dest}» as target repo but this script detected it should go to: «${_source_repo}»"
final_dest=${_dest}
else
msg "you supplied «${_dest}» as target repo, this script detected this is the proper place"
final_dest=${_dest}
fi
else
final_dest=${_source_repo}
fi
fi
fi
if [ "${final_dest}" == "$(echo "${_cur_repo}" | cut -d- -f2)" ] ; then
newline
error "this package it is already in ${final_dest}!"
newline
exit 1
fi
newline
msg "moving to target repo: «${final_dest}»"
newline
question "Do you really want to move the package(s)? (y/n) "
while true ; do
read yn
case $yn in
[yY]* )
move_and_recreate_db ;
break ;
;;
[nN]* )
exit
;;
q* )
exit
;;
* )
echo "Enter (y)es or (n)o"
;;
esac
done
}
#
# startup
#
clear
title "${_script_name} v${_ver} - $_cur_repo-$_build_arch"
if [ "${_args}" = "" ] ; then
error " !! You need to specify a target to move,"
error " single names like «attica» or wildcards (*) are allowed."
newline
exit 1
fi
check_configs
load_configs
check_rsync
check_accounts
sync_down
check_files
# Generate the list of packages to move
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] || [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
_pkgz_to_move=`ls ${_sync_folder}${_args}* | cut -d/ -f2`
else
_pkgz_to_move=`ls ${_sync_folder}${_args}* | cut -d/ -f3`
fi
if [ "${_pkgz_to_move}" = "" ] ; then
exit
fi
newline
warning "The following packages will be moved:"
newline
echo "${_pkgz_to_move}"
move_packages "${_pkgz_to_move}"
newline
title "All done"
newline

93
ogre/PKGBUILD Normal file
View File

@ -0,0 +1,93 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgbase=ogre
pkgname=('ogre' 'ogre-docs')
pkgver=1.7.2
pkgrel=1
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
arch=('i686' 'x86_64')
url='http://www.ogre3d.org'
license=('custom:MIT')
depends=('boost' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'ois')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu')
optdepends=('cppunit: unit testing'
'intel-tbb: better threading support'
'poco: portability')
install=ogre.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_src_v${pkgver//./-}.tar.bz2")
md5sums=('dd6574b8d906a74950c1e05633b2e96f')
build() {
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}
# get a clean build dir
[[ -d build ]] && rm -rf build
mkdir build
cd build
# generate CMake Makefile
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOGRE_INSTALL_PLUGINS_HEADERS=TRUE \
-DOGRE_INSTALL_SAMPLES=TRUE \
-DOGRE_INSTALL_DOCS=TRUE \
-DOGRE_INSTALL_MEDIA=TRUE \
-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \
-DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
# compile
make
# generate docs
if [[ $(which dot) && $(which doxygen) ]]; then
make doc
fi
}
package_ogre() {
optdepends=('ogre-docs: documentation')
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}/build
# install the bugger
make DESTDIR=${pkgdir} install
# fix up samples
install -dm775 -o root -g users ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/share/OGRE/*.cfg ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/opt/OGRE/samples/
# make sample launcher
echo "#!/bin/bash" > ${pkgdir}/usr/bin/OgreSampleBrowser
echo "cd /opt/OGRE/samples && ./SampleBrowser" >> ${pkgdir}/usr/bin/OgreSampleBrowser
chmod +x ${pkgdir}/usr/bin/OgreSampleBrowser
# install license
install -Dm644 ../Docs/License.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html
# move docs out of this package
mv ${pkgdir}/usr/share/OGRE/docs ${srcdir}/docs
}
package_ogre-docs() {
pkgdesc="Documentation for ogre"
depends=()
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}/build
# move docs into this package
install -dm755 ${pkgdir}/usr/share/doc
mv ${srcdir}/docs ${pkgdir}/usr/share/doc/OGRE/
# symlink for docs
install -dm755 ${pkgdir}/usr/share/OGRE/
cd ${pkgdir}/usr/share
ln -s doc/OGRE/ OGRE/docs
}

4
ogre/ogre.install Normal file
View File

@ -0,0 +1,4 @@
post_install() {
echo "To view the OGRE samples just run OgreSampleBrowser or launch"
echo "it directly in /opt/OGRE/samples/"
}

31
ois/PKGBUILD Normal file
View File

@ -0,0 +1,31 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=ois
pkgver=1.3
pkgrel=1
pkgdesc="Object Oriented Input System"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/wgois"
license=('zlib/libpng')
makedepends=('autoconf' 'automake' 'libtool' 'gcc' 'libxaw')
source=("http://downloads.sourceforge.net/project/wgois/Source%20Release/${pkgver}/ois_v${pkgver/./-}.tar.gz")
md5sums=('9697fead17eac6025151cd2e1fca1518')
build() {
cd ${srcdir}/${pkgname}-v${pkgver/./-}
chmod +x bootstrap
./bootstrap
./configure --prefix=/usr
make
}
package() {
cd ${srcdir}/${pkgname}-v${pkgver/./-}
make DESTDIR=${pkgdir} install
}

239
rmpkg.sh Executable file
View File

@ -0,0 +1,239 @@
#!/bin/bash
# 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, see <http://www.gnu.org/licenses/>
#
# (c) 2010 - Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# global vars
#
_script_name="Remove Package(s)"
_cur_repo=$(pwd | awk -F '/' '{print $NF}')
_needed_functions="config_handling helpers messages"
_build_arch="$_arch"
_sarch="x32"
_args=`echo $1`
[[ ${_arch} = *x*64* ]] && _sarch="x64"
# helper functions
for subroutine in ${_needed_functions} ; do
source _buildscripts/functions/${subroutine}
done
# Determine the sync folder
if [[ ${_cur_repo} = *-testing ]] && [[ ${_cur_repo} != lib32-testing ]] ; then
_sync_folder="_testing-${_sarch}/"
elif [[ ${_cur_repo} = *-unstable ]] ; then
_sync_folder="_unstable-${_sarch}/"
else
_sync_folder="_repo/remote/"
fi
#
# main
#
exit_with_error()
{
newline
newline
error "failed performing the current operation, aborting..."
newline
exit 1
}
sync_down()
{
msg "syncing down"
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} || exit_with_error
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/unstable/$_build_arch/* ${_sync_folder} || exit_with_error
else
rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} || exit_with_error
fi
}
check_files()
{
# Get the file list in the server
export RSYNC_PASSWORD=$(echo ${_rsync_pass})
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2`
else
repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | cut -d ":" -f 3 | cut -d " " -f 2`
fi
# Get the file list in the sync folder
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] || [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 2`
else
local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 3`
fi
remove_list=""
for parse_file in ${local_files} ; do
file_exist="false"
for compare_file in ${repo_files} ; do
if [ "${parse_file}" = "${compare_file}" ] ; then
file_exist="true"
fi
done
if [ "${file_exist}" = "false" ] ; then
remove_list="${remove_list} ${parse_file}"
fi
done
if [ "$remove_list" != "" ] ; then
msg "The following packages in ${_sync_folder} don't exist in the sever:"
newline
echo "${remove_list}"
newline
question "Do you want to remove the package(s)? (y/n) "
while true ; do
read yn
case ${yn} in
[yY]* )
newline ;
remove_packages "${remove_list}" ;
break
;;
[nN]* )
newline ;
title "The files will be keeped..." ;
newline ;
break
;;
* )
echo "Enter (y)es or (n)o"
;;
esac
done
fi
}
remove_packages()
{
# remove the package(s) from sync folder
msg "removing the packages(s) from ${_sync_folder}"
pushd $_sync_folder &>/dev/null
rm -vrf $1
popd &>/dev/null
}
sync_up()
{
# create new pacman database
msg "creating pacman database"
rm -rf ${_sync_folder}*.db.tar.*
pushd ${_sync_folder} &>/dev/null
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
repo-add testing.db.tar.gz *.pkg.*
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
repo-add unstable.db.tar.gz *.pkg.*
else
repo-add ${_cur_repo}.db.tar.gz *.pkg.*
fi
popd &>/dev/null
# sync local -> server, removing the packages
msg "sync local -> server"
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/ || exit_with_error
elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/ || exit_with_error
else
rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::${_rsync_dir} || exit_with_error
fi
}
#
# startup
#
clear
title "${_script_name} - $_cur_repo-$_build_arch"
if [ "${_args}" = "" ] ; then
error " !! You need to specify a target to remove,"
error " single names like «attica» or wildcards (*) are allowed."
newline
exit 1
fi
check_configs
load_configs
check_rsync
check_accounts
# First get the actual packages from the repo
sync_down
# Check if there's any outdated file
msg "Searching removed files"
check_files
# Generate the list of packages to remove
newline
_args=${_args}*
if [ "${_sync_folder}" = "_testing-${_sarch}/" ] || [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then
_pkgz_to_remove=`ls ${_sync_folder}${_args} | cut -d/ -f2`
else
_pkgz_to_remove=`ls ${_sync_folder}${_args} | cut -d/ -f3`
fi
if [ "${_pkgz_to_remove}" = "" ] ; then
exit
fi
warning "The following packages will be removed:"
newline
echo "${_pkgz_to_remove}"
newline
question "Do you really want to remove the package(s)? (y/n/q) "
while true ; do
read yn
case $yn in
[yY]* )
newline ;
remove_packages "${_pkgz_to_remove}" ;
sync_up ;
newline ;
title "All done" ;
newline ;
break
;;
[nN]* )
exit
;;
q* )
exit
;;
* )
echo "Enter (y)es or (n)o"
;;
esac
done

38
zziplib/PKGBUILD Normal file
View File

@ -0,0 +1,38 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=zziplib
pkgver=0.13.58
pkgrel=1
pkgdesc="A lightweight library that offers the ability to easily extract data from files archived in a single zip file"
arch=('i686' 'x86_64')
url="http://zziplib.sourceforge.net"
license=('LGPL' 'MPL')
depends=('zlib')
makedepends=('python')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
md5sums=('a0f743a5a42ca245b2003ecaea958487')
options=('!libtool')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
export PYTHON=/usr/bin/python2
./configure --prefix=/usr
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
#fix permission
chmod -s ${pkgdir}/usr/share/man/man3
chmod 644 ${pkgdir}/usr/share/man/man3/*
chown -R root:root ${pkgdir}/usr/share/man/man3
}