2004-04-05 21:32:18 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-08-07 03:24:49 +00:00
|
|
|
#
|
|
|
|
# Use "make distfile" to build a tar.gz file suitable for distribution,
|
|
|
|
# including an autoconf/automake-generated build system.
|
|
|
|
#
|
|
|
|
|
2004-04-05 21:32:18 +00:00
|
|
|
PROG= bsdtar
|
2005-03-13 18:36:24 +00:00
|
|
|
VERSION= 1.01.022
|
2005-03-13 23:49:53 +00:00
|
|
|
DIST_SRCS= bsdtar.c getdate.y matching.c read.c util.c write.c
|
|
|
|
SRCS= ${DIST_SRCS}
|
|
|
|
WARNS?= 5
|
2004-04-12 18:06:07 +00:00
|
|
|
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
|
|
|
|
LDADD= -larchive -lbz2 -lz
|
2004-07-26 03:21:41 +00:00
|
|
|
CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\"
|
2005-03-13 19:55:53 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}
|
2004-04-05 21:32:18 +00:00
|
|
|
|
2004-07-17 06:03:47 +00:00
|
|
|
.if !defined(WITH_GTAR)
|
2004-11-12 13:28:42 +00:00
|
|
|
SYMLINKS= bsdtar ${BINDIR}/tar
|
2004-04-19 22:09:04 +00:00
|
|
|
MLINKS= bsdtar.1 tar.1
|
|
|
|
.endif
|
|
|
|
|
2004-08-07 03:24:49 +00:00
|
|
|
DIST_BUILD_DIR= ${.OBJDIR}/${PROG}-${VERSION}
|
|
|
|
CLEANDIRS+= ${DIST_BUILD_DIR}
|
|
|
|
DISTFILE= ${PROG}-${VERSION}.tar.gz
|
|
|
|
# Files that just get copied to the distfile build directory
|
2005-03-13 23:49:53 +00:00
|
|
|
DIST_FILES= ${DIST_SRCS}
|
2004-08-07 03:24:49 +00:00
|
|
|
DIST_FILES+= ${MAN}
|
|
|
|
DIST_FILES+= bsdtar.h bsdtar_platform.h
|
|
|
|
DIST_FILES+= Makefile.am
|
|
|
|
DIST_FILES+= fts.c fts.h
|
2004-04-05 21:32:18 +00:00
|
|
|
|
2004-08-07 03:24:49 +00:00
|
|
|
distfile:
|
|
|
|
rm -rf ${DIST_BUILD_DIR}
|
|
|
|
mkdir ${DIST_BUILD_DIR}
|
|
|
|
for f in ${DIST_FILES}; \
|
|
|
|
do \
|
|
|
|
cat ${.CURDIR}/$$f >${DIST_BUILD_DIR}/$$f; \
|
|
|
|
done
|
|
|
|
cat ${.CURDIR}/configure.ac.in | \
|
|
|
|
sed 's/@VERSION@/${VERSION}/' | \
|
|
|
|
cat > ${DIST_BUILD_DIR}/configure.ac
|
|
|
|
(cd ${DIST_BUILD_DIR} && aclocal && autoheader && autoconf )
|
|
|
|
(cd ${DIST_BUILD_DIR} && automake -a --foreign)
|
|
|
|
(cd ${DIST_BUILD_DIR} && ./configure && make distcheck && make dist)
|
|
|
|
mv ${DIST_BUILD_DIR}/${DISTFILE} ${.OBJDIR}
|
|
|
|
@echo ==================================================
|
|
|
|
@echo Created ${.OBJDIR}/${DISTFILE}
|
|
|
|
@echo ==================================================
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|