Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ install:

dist:
./dist.sh RELEASE=$(RELEASE)

distcheck: dist
@set -e; set -x; \
tarball=`ls *.tar.gz | head -n 1`; \
rm -rf checkdir; \
mkdir checkdir; \
cd checkdir; \
tar xzf ../$$tarball; \
cd *; \
make; \
make install DESTDIR=`pwd`/root; \
cd .. ;\
rm -rf checkdir

.PHONEY: all clean dep dist distcheck install
15 changes: 14 additions & 1 deletion dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@ tarball=${distdir}.tar.gz

test -z "$RELEASE" || rel=$RELEASE

dch_entry() {
cat <<EOF
ibsim ($ver) unstable; urgency=low

* New upstream release.

-- Tzafrir Cohen <nvidia@cohens.org.il> `date -R`

EOF
}

rm -f $tarball
rm -rf $distdir
mkdir $distdir

files=`find . -name '*.[ch]' -o -name Makefile`
files=`find . -name '*.[ch]' -o -name Makefile -o -name '*.in'`
cp -a --parents $files debian \
defs.mk README COPYING TODO net-examples scripts tests $distdir

cat ibsim.spec.in \
| sed -e 's/@VERSION@/'$ver'/' -e 's/@RELEASE@/'$rel'/' -e 's/@TARBALL@/'$tarball'/' \
> $distdir/ibsim.spec

(dch_entry; cat debian/changelog) >$distdir/debian/changelog

tar czf $tarball $distdir
rm -rf $distdir