xref: /netbsd-src/external/public-domain/xz/prepare-import.sh (revision 4b004442778f1201b2161e87fd65ba87aae6601a)
1#!/bin/sh
2# $NetBSD: prepare-import.sh,v 1.5 2018/09/25 05:38:10 joerg Exp $
3
4set -e
5
6rm -rf dist tmp
7tar xf xz-5.2.4.tar.xz
8mv xz-5.2.4 dist
9
10cd dist
11# Binary files derived from distribution files
12rm -rf doc/man
13# Files under GPL
14rm -rf extra lib m4/[a-s]* m4/[u-z]* src/scripts/xz* Doxyfile.in
15# Files not of relevance
16rm -rf ABOUT-NLS aclocal.m4 autogen.sh COPYING.*GPL* INSTALL.generic
17mkdir po.tmp
18mv po/*.po po/*.gmo po.tmp/
19rm -rf po
20mv po.tmp po
21rm -rf debug dos windows
22rm -rf Makefile* */Makefile* */*/Makefile* */*/*/Makefile*
23# Files under GPL/LGPL kept:
24# build-aux/* from autoconf
25# Binary files to be encoded
26for f in tests/compress_prepared_bcj_sparc tests/compress_prepared_bcj_x86 \
27	 tests/files/*.xz; do
28	uuencode -m $f $f > $f.base64
29	rm $f
30done
31
32grep -v '^ac_config_files=' configure > configure.new
33mv configure.new ../configure
34