12710e4d1STim Kientzle# $FreeBSD$ 2bfe891b1STim Kientzle 3bfe891b1STim Kientzle# 4bfe891b1STim Kientzle# Use "make distfile" to build a conventional tar.gz archive 5bfe891b1STim Kientzle# complete with autoconf/automake-generated build system. 6bfe891b1STim Kientzle# 7bfe891b1STim Kientzle 8bfe891b1STim Kientzle 9bfe891b1STim KientzleLIB= archive 10b772d06cSTim KientzleVERSION= 1.01.015 1191ce8f27STim KientzleARCHIVE_API_FEATURE= 2 1291ce8f27STim KientzleARCHIVE_API_VERSION= 1 1391ce8f27STim KientzleSHLIB_MAJOR= ${ARCHIVE_API_VERSION} 14bfe891b1STim KientzleCFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\" 15bfe891b1STim KientzleCFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" 16bfe891b1STim KientzleCFLAGS+= -I${.OBJDIR} 17bfe891b1STim Kientzle 18bfe891b1STim Kientzle.if ${MACHINE_ARCH} == "arm" 19bfe891b1STim KientzleWARNS?= 3 20bfe891b1STim Kientzle.else 21bfe891b1STim KientzleWARNS?= 6 22bfe891b1STim Kientzle.endif 23bfe891b1STim Kientzle 24bfe891b1STim KientzleINCS= archive.h archive_entry.h 25bfe891b1STim Kientzle 2600ccc351STim Kientzle# Note: archive.h does need to be listed here, since it's built 2700ccc351STim KientzleSRCS= archive.h \ 2800ccc351STim Kientzle archive_check_magic.c \ 29bfe891b1STim Kientzle archive_entry.c \ 30bfe891b1STim Kientzle archive_read.c \ 31bfe891b1STim Kientzle archive_read_data_into_buffer.c \ 32bfe891b1STim Kientzle archive_read_data_into_fd.c \ 33bfe891b1STim Kientzle archive_read_extract.c \ 34bfe891b1STim Kientzle archive_read_open_fd.c \ 35bfe891b1STim Kientzle archive_read_open_file.c \ 36bfe891b1STim Kientzle archive_read_support_compression_all.c \ 37bfe891b1STim Kientzle archive_read_support_compression_bzip2.c \ 38bfe891b1STim Kientzle archive_read_support_compression_compress.c \ 39bfe891b1STim Kientzle archive_read_support_compression_gzip.c \ 40bfe891b1STim Kientzle archive_read_support_compression_none.c \ 41bfe891b1STim Kientzle archive_read_support_format_all.c \ 42bfe891b1STim Kientzle archive_read_support_format_cpio.c \ 43bfe891b1STim Kientzle archive_read_support_format_tar.c \ 44bfe891b1STim Kientzle archive_string.c \ 45bfe891b1STim Kientzle archive_string_sprintf.c \ 46bfe891b1STim Kientzle archive_util.c \ 47bfe891b1STim Kientzle archive_write.c \ 48bfe891b1STim Kientzle archive_write_open_fd.c \ 49bfe891b1STim Kientzle archive_write_open_file.c \ 50bfe891b1STim Kientzle archive_write_set_compression_bzip2.c \ 51bfe891b1STim Kientzle archive_write_set_compression_gzip.c \ 52bfe891b1STim Kientzle archive_write_set_compression_none.c \ 53bfe891b1STim Kientzle archive_write_set_format.c \ 54bfe891b1STim Kientzle archive_write_set_format_by_name.c \ 55bfe891b1STim Kientzle archive_write_set_format_cpio.c \ 56bfe891b1STim Kientzle archive_write_set_format_pax.c \ 57bfe891b1STim Kientzle archive_write_set_format_shar.c \ 58bfe891b1STim Kientzle archive_write_set_format_ustar.c 59bfe891b1STim Kientzle 60bfe891b1STim KientzleMAN= archive_entry.3 \ 61bfe891b1STim Kientzle archive_read.3 \ 62bfe891b1STim Kientzle archive_util.3 \ 63bfe891b1STim Kientzle archive_write.3 \ 64bfe891b1STim Kientzle libarchive.3 \ 65bfe891b1STim Kientzle libarchive-formats.5 \ 66bfe891b1STim Kientzle tar.5 67bfe891b1STim Kientzle 68bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_add_entry.3 69bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_add_entry_w.3 70bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_clear.3 71bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_count.3 72bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_next.3 73bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_next_w.3 74bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_reset.3 75bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_acl_text_w.3 76bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_clear.3 77bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_clone.3 78bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3 79bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_gname_w.3 80bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3 81bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3 82bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_stat.3 83bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3 84bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_copy_uname_w.3 85bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_fflags.3 86bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_fflags_text.3 87bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_free.3 88bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_gid.3 89bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_gname.3 90bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_gname_w.3 91bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_hardlink.3 92bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_ino.3 93bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_mode.3 94bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_mtime.3 95bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_mtime_nsec.3 96bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_new.3 97bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_pathname.3 98bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_pathname_w.3 99bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_rdev.3 100bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_rdevmajor.3 101bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_rdevminor.3 102bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_fflags.3 103bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_gid.3 104bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_gname.3 105bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_hardlink.3 106bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_link.3 107bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_mode.3 108bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_pathname.3 109bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_rdevmajor.3 110bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_rdevminor.3 111bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_size.3 112bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_symlink.3 113bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_uid.3 114bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_set_uname.3 115bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_size.3 116bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_stat.3 117bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_symlink.3 118bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_uid.3 119bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_uname.3 120bfe891b1STim KientzleMLINKS+= archive_entry.3 archive_entry_uname_w.3 121bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_data.3 122bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_data_block.3 123bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_data_into_buffer.3 124bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_data_into_fd.3 125bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_data_skip.3 126bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_extract.3 127bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3 128bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_finish.3 129bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_new.3 130bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_next_header.3 131bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_open.3 132bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_open_fd.3 133bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_open_file.3 134bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_set_bytes_per_block.3 135bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_compression_all.3 136bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_compression_bzip2.3 137bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_compression_compress.3 138bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_compression_gzip.3 139bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_compression_none.3 140bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_format_all.3 141bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_format_cpio.3 142bfe891b1STim KientzleMLINKS+= archive_read.3 archive_read_support_format_tar.3 143bfe891b1STim KientzleMLINKS+= archive_util.3 archive_compression.3 144bfe891b1STim KientzleMLINKS+= archive_util.3 archive_compression_name.3 145bfe891b1STim KientzleMLINKS+= archive_util.3 archive_errno.3 146bfe891b1STim KientzleMLINKS+= archive_util.3 archive_error_string.3 147bfe891b1STim KientzleMLINKS+= archive_util.3 archive_format.3 148bfe891b1STim KientzleMLINKS+= archive_util.3 archive_format_name.3 149b772d06cSTim KientzleMLINKS+= archive_util.3 archive_set_error.3 150bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_data.3 151bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_finish.3 152bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_header.3 153bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_new.3 154bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_open.3 155bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_open_fd.3 156bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_open_file.3 157bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_prepare.3 158bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_bytes_per_block.3 159bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_bytes_in_last_block.3 160bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_callbacks.3 161bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_compression_bzip2.3 162bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_compression_gzip.3 163bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_format_pax.3 164bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_format_shar.3 165bfe891b1STim KientzleMLINKS+= archive_write.3 archive_write_set_format_ustar.3 166bfe891b1STim KientzleMLINKS+= libarchive.3 archive.3 167bfe891b1STim Kientzle 168bfe891b1STim Kientzle# Build archive.h from archive.h.in 16948cbe722STim Kientzlearchive.h: archive.h.in Makefile 170bfe891b1STim Kientzle cat ${.CURDIR}/archive.h.in | \ 17191ce8f27STim Kientzle sed 's/@ARCHIVE_API_VERSION@/${ARCHIVE_API_VERSION}/' | \ 172bfe891b1STim Kientzle sed 's/@ARCHIVE_API_FEATURE@/${ARCHIVE_API_FEATURE}/' | \ 173bfe891b1STim Kientzle cat > archive.h 174bfe891b1STim Kientzle 17500ccc351STim Kientzle# archive.h needs to be cleaned 17600ccc351STim KientzleCLEANFILES+= archive.h 17700ccc351STim Kientzle 17800ccc351STim Kientzle# 17900ccc351STim Kientzle# Voodoo for building a distfile that uses autoconf/automake/etc. 18000ccc351STim Kientzle# 18100ccc351STim Kientzle 182bfe891b1STim Kientzle# Files that just get copied to the distfile build directory 183bfe891b1STim KientzleDIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION} 18400ccc351STim KientzleCLEANDIRS+= ${DIST_WORK_DIR} 185bfe891b1STim KientzleDISTFILE= lib${LIB}-${VERSION}.tar.gz 186bfe891b1STim KientzleDIST_FILES= ${SRCS} 187bfe891b1STim KientzleDIST_FILES+= ${MAN} 188bfe891b1STim KientzleDIST_FILES+= archive.h.in 189bfe891b1STim KientzleDIST_FILES+= archive_entry.h archive_platform.h 190bfe891b1STim KientzleDIST_FILES+= archive_private.h archive_string.h 191bfe891b1STim KientzleDIST_FILES+= Makefile.am 192bfe891b1STim Kientzle 193bfe891b1STim Kientzledistfile: 194bfe891b1STim Kientzle rm -rf ${DIST_WORK_DIR} 195bfe891b1STim Kientzle mkdir ${DIST_WORK_DIR} 196bfe891b1STim Kientzle for f in ${DIST_FILES}; \ 197bfe891b1STim Kientzle do \ 198b772d06cSTim Kientzle cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true; \ 199bfe891b1STim Kientzle done 200bfe891b1STim Kientzle cat ${.CURDIR}/configure.ac.in | \ 201bfe891b1STim Kientzle sed 's/@VERSION@/${VERSION}/' | \ 202bfe891b1STim Kientzle cat > ${DIST_WORK_DIR}/configure.ac 203bfe891b1STim Kientzle (cd ${DIST_WORK_DIR} && aclocal && autoheader && autoconf && automake -a --foreign) 204bfe891b1STim Kientzle (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist) 205bfe891b1STim Kientzle mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR} 206bfe891b1STim Kientzle @echo ================================================== 207bfe891b1STim Kientzle @echo Created ${.OBJDIR}/${DISTFILE} 208bfe891b1STim Kientzle @echo ================================================== 209bfe891b1STim Kientzle 210bfe891b1STim Kientzle.include <bsd.lib.mk> 211