DATE=`date +"%d%b%y"`

FILE=bed-$VERSION.src.tar.gz
#RELEASE=`cat src/sourcenumber`

SIZE=`ls -s --human-readable $DISTPATH/$FILE|cut -d ' ' -f 1`
cat <<!
Name: bed
Version: $VERSION
Release: 1
Summary: menu driven variable dataformat binary editor for linux 
Source: sunsite.unc.edu:/pub/Linux/apps/editors/terminal/$FILE 
Url: http://bedlinux.tripod.com
Copyright: GPL
Group: Applications/Editors
%description 
!
sed -e 's/^[ 	]*//g' <description
cat <<!
%prep
%setup

%build
make realclean
make linuxconfig
make dep
make
%install
if test -e $CONFDIR/uninstallbed.sh; then bash $CONFDIR/uninstallbed.sh --force ; fi
make install
%post
cd $CONFDIR
bash ./addmagic.sh
if  which update-menus; then update-menus; fi
%files
%config $CONFDIR
$CONFDIRLINK
$BINDIR/bed
$BINDIR/xbed
$MANDIR/bed.1.gz
$MANDIR/xbed.1.gz
$MENUPATH/bed
!
tr ' ' '\n' <<!
$PROGMANEXTRA

!
