-
Notifications
You must be signed in to change notification settings - Fork 667
/
commercialize.sh
executable file
·72 lines (58 loc) · 2.13 KB
/
commercialize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#! /bin/sh
# This is a script used by the FFTW copyright holders to
# create commercial versions with a non-GPL license.
# You should never need to use it.
tarball=$1
newtarball="commercial-"`basename $tarball`
echo "Commercializing $tarball to produce $newtarball"
d=`basename $tarball .tar.gz`
rm -rf $d
tar xpzf $tarball
find $d -type f -print | while read name; do
sed -e '/^ [*] This program is free software; you can redistribute it and\/or modify$/,/ [*] Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/c\
* See the file COPYING for license information.' $name > ${name}.tmp
chmod --reference=$name ${name}.tmp
touch --reference=$name ${name}.tmp
mv ${name}.tmp $name
done
for name in $d/tools/fftw-wisdom.c; do
sed -e '/This program is free software; you can redistribute it and\/or modify/,/["]Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA..["]/c\
"See the file COPYING for license information.\\n"' $name > ${name}.tmp
chmod --reference=$name ${name}.tmp
touch --reference=$name ${name}.tmp
mv ${name}.tmp $name
done
for name in $d/configure.ac; do
cat $name | sed -e 's+AC_INIT(fftw,+AC_INIT(commercial-fftw,+' > ${name}.tmp
chmod --reference=$name ${name}.tmp
touch --reference=$name ${name}.tmp
mv ${name}.tmp $name
done
(
cd $d;
rm -rf autom4te.cache
autoreconf --verbose --install --symlink --force
autoreconf --verbose --install --symlink --force
autoreconf --verbose --install --symlink --force
rm -f config.cache
rm -f COPYING
cat >COPYING <<EOF
This package is licensed commercially by the MIT Technology Licensing
Office (TLO); you should have a license agreement describing the terms
you have negotiated.
Please note that this package is provided WITHOUT ANY WARRANTY.
See your license agreement for complete details.
Contact Mr. Tyler A Guitroz <[email protected]> for more information
regarding licensing.
EOF
for name in simd/*mips*.[ch]; do
cat >$name <<EOF
/* This file is (C) Codesourcery and removed from the commercial
version of FFTW */
EOF
done
./configure --enable-sse2
make dist
mv $newtarball ..
)
rm -rf $d