Here's the way I do it with PkgBuild:
http://distro.ibiblio.org/pub/linux/...ogwatch-7.3.1/
#!/bin/bash
## PkgBuild script for: logwatch
## Auto-generated by 'src2pkg'
BUILD='1'
NAME='logwatch'
VERSION='7.3.1'
SRC_SUFFIX='.tar.bz2'
STD_FLAGS='-O2 -march=i486 -mtune=i686'
PRE_FIX='/usr'
EXTRA_CONFIGS=''
FORCE_ZERO_LENGTH=YES
# Get the functions and configs
source /usr/libexec/pkgbuild/FUNCTIONS ;
# do_all_processes can substitute these 16 steps:
pre_process
find_source
make_dirs
unpack_source
# apply this debian patch from the original developer
cd $SRC_DIR && patch -p1 < $CWD/logwatch-7.3.1-3.diff 1> /dev/null
fix_source_perms
# configure_source
# compile_source
# fake_install
cd $SRC_DIR
mkdir -p $PKG_DIR/etc/logwatch
mkdir -p $PKG_DIR/etc/logwatch/scripts
mkdir -p $PKG_DIR/etc/logwatch/conf
mkdir -p $PKG_DIR/etc/logwatch/conf/logfiles
mkdir -p $PKG_DIR/etc/logwatch/conf/services
touch $PKG_DIR/etc/logwatch/conf/logwatch.conf
touch $PKG_DIR/etc/logwatch/conf/ignore.conf
touch $PKG_DIR/etc/logwatch/conf/override.conf
mkdir -p $PKG_DIR/usr/share/logwatch
mkdir -p $PKG_DIR/usr/share/logwatch/dist.conf
mkdir -p $PKG_DIR/usr/share/logwatch/dist.conf/logfiles
mkdir -p $PKG_DIR/usr/share/logwatch/dist.conf/services
cp -a conf/ $PKG_DIR/usr/share/logwatch/default.conf
cp -a scripts/ $PKG_DIR/usr/share/logwatch/scripts
cp -a lib $PKG_DIR/usr/share/logwatch/lib
mkdir -p $PKG_DIR/var/cache/logwatch
mkdir -p $PKG_DIR/etc/cron.daily
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process
# Amigo PkgBuild and src2pkg - Copyright 2005-2006 Gilbert Ashley <amigo@ibiblio.org>
## See the documentation for more help and examples. Below are some of
# the most common Extras and Options for easy cut-and-paste use.
# EXTRA_CONFIGS='' PRE_FIX='' DOCLIST='' INSTALL_RULE='' CONFIG_SUBDIR=''
# end PkgBuild script
doinst.sh:
( ln -sf /usr/share/logwatch/scripts/logwatch.pl /etc/cron.daily/0logwatch )
( ln -sf /usr/share/logwatch/scripts/logwatch.pl /usr/sbin/logwatch )