#!/bin/bash # Copyright (C) 2010 Matías A. Fonzo, # # 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 3 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 . set -e CWD=$(pwd) TMP=${TMP:-/tmp/sources} OUT=${OUT:-/tmp/packages} V=2.4 ARCH=noarch B=1 PKG=${TMP}/package-pkgsystem rm -rf $PKG mkdir -p $PKG $OUT cd $PKG ( cd ${CWD}/tools for file in * ; do install --mode=0750 --owner=0:0 $file -D ${PKG}/sbin/$file done ) ( cd ${CWD}/commands for file in * ; do install --mode=0750 --owner=0:0 $file \ -D ${PKG}/usr/libexec/pkg/commands/$file done ) ( cd ${CWD}/language for file in * ; do install --mode=0644 --owner=0:0 $file \ -D ${PKG}/usr/libexec/pkg/language/$file done ) # Add the documentation: ( cd ${CWD} mkdir -p ${PKG}/usr/doc/pkgsystem-${V} cp -a \ AUTHORS ChangeLog COPYING CREDITS \ ${PKG}/usr/doc/pkgsystem-${V} ) # Copy the description files: mkdir -p ${PKG}/description cp ${CWD}/description/* ${PKG}/description/ makepkg ${OUT}/pkgsystem-${V}-${ARCH}-${B}.tlz