1# $FreeBSD$ 2 3LIB= archive 4DPADD= ${LIBBZ2} ${LIBZ} 5LDADD= -lbz2 -lz 6 7# The libarchive version stamp. 8# Version is three numbers: 9# Major: Bumped ONLY when API/ABI breakage happens (see SHLIB_MAJOR) 10# Minor: Bumped when significant new features are added 11# Revision: Bumped on any notable change 12VERSION= 2.2.4 13 14ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//' 15ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//' 16ARCHIVE_API_REV!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/.*\.//' 17 18# Can't use /usr/bin/printf to format the version stamp here, because 19# that's not available during installworld. Fortunately, awk is. 20ARCHIVE_VERSION_STAMP!= echo ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REV} | awk '{printf("%d%03d%03d",$$1,$$2,$$3)}' 21 22# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. 23# It has no real relation to the version number above. 24SHLIB_MAJOR= 4 25 26CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\" 27CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" 28CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 29CFLAGS+= -I${.OBJDIR} 30 31WARNS?= 6 32 33# Headers to be installed in /usr/include 34INCS= archive.h archive_entry.h 35 36# Build archive.h from archive.h.in by substituting version information. 37# Note: FreeBSD has inttypes.h, so enable that include in archive.h.in 38archive.h: archive.h.in Makefile 39 cat ${.CURDIR}/archive.h.in | sed \ 40 -e 's/@ARCHIVE_VERSION@/${VERSION}/g' \ 41 -e 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' \ 42 -e 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' \ 43 -e 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' \ 44 -e 's/@ARCHIVE_VERSION_STAMP@/${ARCHIVE_VERSION_STAMP}/g' \ 45 -e 's|@ARCHIVE_H_INCLUDE_INTTYPES_H@|#include <inttypes.h> /* For int64_t */|g' \ 46 > archive.h 47 48# archive.h needs to be cleaned 49CLEANFILES+= archive.h 50 51# Sources to be compiled. 52SRCS= archive.h \ 53 archive_check_magic.c \ 54 archive_entry.c \ 55 archive_entry_copy_stat.c \ 56 archive_entry_stat.c \ 57 archive_read.c \ 58 archive_read_data_into_fd.c \ 59 archive_read_extract.c \ 60 archive_read_open_fd.c \ 61 archive_read_open_file.c \ 62 archive_read_open_filename.c \ 63 archive_read_open_memory.c \ 64 archive_read_support_compression_all.c \ 65 archive_read_support_compression_bzip2.c \ 66 archive_read_support_compression_compress.c \ 67 archive_read_support_compression_gzip.c \ 68 archive_read_support_compression_none.c \ 69 archive_read_support_compression_program.c \ 70 archive_read_support_format_all.c \ 71 archive_read_support_format_ar.c \ 72 archive_read_support_format_cpio.c \ 73 archive_read_support_format_empty.c \ 74 archive_read_support_format_iso9660.c \ 75 archive_read_support_format_tar.c \ 76 archive_read_support_format_zip.c \ 77 archive_string.c \ 78 archive_string_sprintf.c \ 79 archive_util.c \ 80 archive_virtual.c \ 81 archive_write.c \ 82 archive_write_disk.c \ 83 archive_write_disk_set_standard_lookup.c \ 84 archive_write_open_fd.c \ 85 archive_write_open_file.c \ 86 archive_write_open_filename.c \ 87 archive_write_open_memory.c \ 88 archive_write_set_compression_bzip2.c \ 89 archive_write_set_compression_gzip.c \ 90 archive_write_set_compression_none.c \ 91 archive_write_set_compression_program.c \ 92 archive_write_set_format.c \ 93 archive_write_set_format_ar.c \ 94 archive_write_set_format_by_name.c \ 95 archive_write_set_format_cpio.c \ 96 archive_write_set_format_cpio_newc.c \ 97 archive_write_set_format_pax.c \ 98 archive_write_set_format_shar.c \ 99 archive_write_set_format_ustar.c \ 100 filter_fork.c 101 102# Man pages to be installed. 103MAN= archive_entry.3 \ 104 archive_read.3 \ 105 archive_util.3 \ 106 archive_write.3 \ 107 archive_write_disk.3 \ 108 libarchive.3 \ 109 libarchive-formats.5 \ 110 tar.5 111 112# Symlink the man pages under each function name. 113MLINKS+= archive_entry.3 archive_entry_acl_add_entry.3 114MLINKS+= archive_entry.3 archive_entry_acl_add_entry_w.3 115MLINKS+= archive_entry.3 archive_entry_acl_clear.3 116MLINKS+= archive_entry.3 archive_entry_acl_count.3 117MLINKS+= archive_entry.3 archive_entry_acl_next.3 118MLINKS+= archive_entry.3 archive_entry_acl_next_w.3 119MLINKS+= archive_entry.3 archive_entry_acl_reset.3 120MLINKS+= archive_entry.3 archive_entry_acl_text_w.3 121MLINKS+= archive_entry.3 archive_entry_clear.3 122MLINKS+= archive_entry.3 archive_entry_clone.3 123MLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3 124MLINKS+= archive_entry.3 archive_entry_copy_gname.3 125MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3 126MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3 127MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3 128MLINKS+= archive_entry.3 archive_entry_copy_stat.3 129MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3 130MLINKS+= archive_entry.3 archive_entry_copy_uname.3 131MLINKS+= archive_entry.3 archive_entry_copy_uname_w.3 132MLINKS+= archive_entry.3 archive_entry_dev.3 133MLINKS+= archive_entry.3 archive_entry_devmajor.3 134MLINKS+= archive_entry.3 archive_entry_devminor.3 135MLINKS+= archive_entry.3 archive_entry_filetype.3 136MLINKS+= archive_entry.3 archive_entry_fflags.3 137MLINKS+= archive_entry.3 archive_entry_fflags_text.3 138MLINKS+= archive_entry.3 archive_entry_free.3 139MLINKS+= archive_entry.3 archive_entry_gid.3 140MLINKS+= archive_entry.3 archive_entry_gname.3 141MLINKS+= archive_entry.3 archive_entry_gname_w.3 142MLINKS+= archive_entry.3 archive_entry_hardlink.3 143MLINKS+= archive_entry.3 archive_entry_ino.3 144MLINKS+= archive_entry.3 archive_entry_mode.3 145MLINKS+= archive_entry.3 archive_entry_mtime.3 146MLINKS+= archive_entry.3 archive_entry_mtime_nsec.3 147MLINKS+= archive_entry.3 archive_entry_nlink.3 148MLINKS+= archive_entry.3 archive_entry_new.3 149MLINKS+= archive_entry.3 archive_entry_pathname.3 150MLINKS+= archive_entry.3 archive_entry_pathname_w.3 151MLINKS+= archive_entry.3 archive_entry_rdev.3 152MLINKS+= archive_entry.3 archive_entry_rdevmajor.3 153MLINKS+= archive_entry.3 archive_entry_rdevminor.3 154MLINKS+= archive_entry.3 archive_entry_set_atime.3 155MLINKS+= archive_entry.3 archive_entry_set_ctime.3 156MLINKS+= archive_entry.3 archive_entry_set_dev.3 157MLINKS+= archive_entry.3 archive_entry_set_devmajor.3 158MLINKS+= archive_entry.3 archive_entry_set_devminor.3 159MLINKS+= archive_entry.3 archive_entry_set_fflags.3 160MLINKS+= archive_entry.3 archive_entry_set_gid.3 161MLINKS+= archive_entry.3 archive_entry_set_gname.3 162MLINKS+= archive_entry.3 archive_entry_set_hardlink.3 163MLINKS+= archive_entry.3 archive_entry_set_link.3 164MLINKS+= archive_entry.3 archive_entry_set_mode.3 165MLINKS+= archive_entry.3 archive_entry_set_mtime.3 166MLINKS+= archive_entry.3 archive_entry_set_nlink.3 167MLINKS+= archive_entry.3 archive_entry_set_pathname.3 168MLINKS+= archive_entry.3 archive_entry_set_rdev.3 169MLINKS+= archive_entry.3 archive_entry_set_rdevmajor.3 170MLINKS+= archive_entry.3 archive_entry_set_rdevminor.3 171MLINKS+= archive_entry.3 archive_entry_set_size.3 172MLINKS+= archive_entry.3 archive_entry_set_symlink.3 173MLINKS+= archive_entry.3 archive_entry_set_uid.3 174MLINKS+= archive_entry.3 archive_entry_set_uname.3 175MLINKS+= archive_entry.3 archive_entry_size.3 176MLINKS+= archive_entry.3 archive_entry_stat.3 177MLINKS+= archive_entry.3 archive_entry_symlink.3 178MLINKS+= archive_entry.3 archive_entry_uid.3 179MLINKS+= archive_entry.3 archive_entry_uname.3 180MLINKS+= archive_entry.3 archive_entry_uname_w.3 181MLINKS+= archive_read.3 archive_read_data.3 182MLINKS+= archive_read.3 archive_read_data_block.3 183MLINKS+= archive_read.3 archive_read_data_into_buffer.3 184MLINKS+= archive_read.3 archive_read_data_into_fd.3 185MLINKS+= archive_read.3 archive_read_data_skip.3 186MLINKS+= archive_read.3 archive_read_extract.3 187MLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3 188MLINKS+= archive_read.3 archive_read_extract_set_skip_file.3 189MLINKS+= archive_read.3 archive_read_finish.3 190MLINKS+= archive_read.3 archive_read_new.3 191MLINKS+= archive_read.3 archive_read_next_header.3 192MLINKS+= archive_read.3 archive_read_open.3 193MLINKS+= archive_read.3 archive_read_open2.3 194MLINKS+= archive_read.3 archive_read_open_FILE.3 195MLINKS+= archive_read.3 archive_read_open_fd.3 196MLINKS+= archive_read.3 archive_read_open_file.3 197MLINKS+= archive_read.3 archive_read_open_filename.3 198MLINKS+= archive_read.3 archive_read_open_memory.3 199MLINKS+= archive_read.3 archive_read_support_compression_all.3 200MLINKS+= archive_read.3 archive_read_support_compression_bzip2.3 201MLINKS+= archive_read.3 archive_read_support_compression_compress.3 202MLINKS+= archive_read.3 archive_read_support_compression_gzip.3 203MLINKS+= archive_read.3 archive_read_support_compression_none.3 204MLINKS+= archive_read.3 archive_read_support_compression_program.3 205MLINKS+= archive_read.3 archive_read_support_format_all.3 206MLINKS+= archive_read.3 archive_read_support_format_cpio.3 207MLINKS+= archive_read.3 archive_read_support_format_iso9660.3 208MLINKS+= archive_read.3 archive_read_support_format_tar.3 209MLINKS+= archive_read.3 archive_read_support_format_zip.3 210MLINKS+= archive_util.3 archive_clear_error.3 211MLINKS+= archive_util.3 archive_compression.3 212MLINKS+= archive_util.3 archive_compression_name.3 213MLINKS+= archive_util.3 archive_errno.3 214MLINKS+= archive_util.3 archive_error_string.3 215MLINKS+= archive_util.3 archive_format.3 216MLINKS+= archive_util.3 archive_format_name.3 217MLINKS+= archive_util.3 archive_set_error.3 218MLINKS+= archive_write.3 archive_write_data.3 219MLINKS+= archive_write.3 archive_write_finish.3 220MLINKS+= archive_write.3 archive_write_finish_entry.3 221MLINKS+= archive_write.3 archive_write_get_bytes_in_last_block.3 222MLINKS+= archive_write.3 archive_write_get_bytes_per_block.3 223MLINKS+= archive_write.3 archive_write_header.3 224MLINKS+= archive_write.3 archive_write_new.3 225MLINKS+= archive_write.3 archive_write_open.3 226MLINKS+= archive_write.3 archive_write_open_FILE.3 227MLINKS+= archive_write.3 archive_write_open_fd.3 228MLINKS+= archive_write.3 archive_write_open_file.3 229MLINKS+= archive_write.3 archive_write_open_filename.3 230MLINKS+= archive_write.3 archive_write_open_memory.3 231MLINKS+= archive_write.3 archive_write_set_bytes_in_last_block.3 232MLINKS+= archive_write.3 archive_write_set_bytes_per_block.3 233MLINKS+= archive_write.3 archive_write_set_callbacks.3 234MLINKS+= archive_write.3 archive_write_set_compression_bzip2.3 235MLINKS+= archive_write.3 archive_write_set_compression_gzip.3 236MLINKS+= archive_write.3 archive_write_set_compression_none.3 237MLINKS+= archive_write.3 archive_write_set_compression_program.3 238MLINKS+= archive_write.3 archive_write_set_format_pax.3 239MLINKS+= archive_write.3 archive_write_set_format_shar.3 240MLINKS+= archive_write.3 archive_write_set_format_ustar.3 241MLINKS+= archive_write_disk.3 archive_write_disk_new.3 242MLINKS+= archive_write_disk.3 archive_write_disk_set_group_lookup.3 243MLINKS+= archive_write_disk.3 archive_write_disk_set_options.3 244MLINKS+= archive_write_disk.3 archive_write_disk_set_skip_file.3 245MLINKS+= archive_write_disk.3 archive_write_disk_set_standard_lookup.3 246MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3 247MLINKS+= libarchive.3 archive.3 248 249test: 250 cd ${.CURDIR}/test && make test 251 252.include <bsd.lib.mk> 253