2 # mknetrel.split -- split subpackages
17 if ! libdev 2> /dev/null ; then
20 if expr "$base" : "\(lib\)" > /dev/null 2>&1; then
33 if expr "$base" : "\(lib\)" > /dev/null 2>&1; then
41 mkdir -p ./$prefix/bin || exit 1
42 mv $inst/$prefix/bin/*.dll ./$prefix/bin
43 # better move dlls to bin, see gmp
44 mkdir -p ./$prefix/lib || exit 1
45 mv $inst/$prefix/lib/*.dll ./$prefix/lib
46 mkdir -p ./$prefix/lib || exit 1
47 mv $inst/$prefix/lib/lib*.la ./$prefix/lib
48 mkdir -p ./$prefix/share || exit 1
49 mv $inst/$prefix/share/$base ./$prefix/share
50 rmdir $inst/$prefix/bin || true
51 rmdir $inst/$prefix/lib || true
52 rmdir $inst/$prefix/share || true
56 extras_devel_split () {
57 mkdir -p ./$prefix/bin || exit 1
58 mv $inst/bin/*-config ./$prefix/bin
59 tar -C $inst -cf - ./$prefix/include | tar -xf -
60 rm -rf $inst/$prefix/include
61 # Only static .a libs in devel, load time .la files go in LIB or
63 mkdir -p ./$prefix/lib || exit 1
64 mv $inst/$prefix/lib/*.a ./$prefix/lib
65 mv $inst/$prefix/lib/pkgconfig ./$prefix/lib
66 mkdir -p ./$prefix/share || exit 1
67 tar -C $inst -cf - ./$prefix/share/aclocal | tar -xf -
68 rm -rf $inst/$prefix/share/aclocal
69 tar -C $inst -cf - ./$prefix/share/libtool | tar -xf -
70 rm -rf $inst/$prefix/share/libtool
71 rmdir $inst/$prefix/lib || true
72 rmdir $inst/$prefix/share || true
77 mkdir -p ./$docprefix || exit 1
78 mkdir -p ./$infodir || exit 1
79 tar -C $inst -cf - ./$infodir | tar -xf -
81 if [ "$cygwin" == "mingw" ]; then
82 mkdir -p ./$mandir || exit 1
83 tar -C $inst -cf - ./$mandir | tar -xf -
90 for i in $sub_packages; do
92 mkdir -p $inst-$i || exit 1
96 extras_postinstall () {
100 mkdir -p $inst-doc/$docprefix
104 install -d -m755 $inst/$packagedocdir
106 readmes="$(find . -maxdepth 1 -type f -a -name '[A-Z]*' | egrep -v 'Makefile|GNUmakefile')"
107 install -m644 $readmes $inst/$packagedocdir
108 install -m644 $cygwin/changelog $inst/$packagedocdir/changelog.$Cygwin
112 install -d -m755 $inst/$cygdocdir
115 install -m644 $cygwin/README $inst/$packagedocdir/README.$Cygwin
116 install -m644 $cygwin/README $inst/$cygdocdir/$package.README
118 install -m644 $cygwin/out/README $inst/$packagedocdir/README.$Cygwin
119 install -m644 $cygwin/out/README $inst/$cygdocdir/$package.README
125 dlls=$(find . -name '*dll' -o -name '*.exe' \
126 | xargs $cygcheck 2>&1 | grep '^ [^ ]' \
127 | tr -d '[ \r]' | sed 's@.*\\@@g' | sort -u)
128 for x in $(ls -1 bin/* sbin/*); do
131 dlls="$($cygcheck $x 2>&1 | grep '^ [^ ]' | tr -d '[ \r]' | sed 's@.*bin\\@@g') $dlls"
134 case "$(file -b $x)" in
135 "*Bourne shell script*")
136 requires="bash\n$requires"
139 requires="guile\n$requires"
142 requires="perl\n$requires"
145 requires="python\n$requires"
150 requires="$(cyg-apt find $x | sed 's/:.*//')\n$requires"
152 requires=$(echo -e "$requires" | sort -u)
157 if [ -r $shint ]; then
162 ldesc: "$name - no description (missing $package/$cygwin/$(basename $shint) file)"
165 grep ^requires: $hint || echo "requires: $depends" >> $hint
166 if [ "$cygwin" == "cygwin" ]; then
167 if grep ^build-requires: $hint; then
169 grep -v build-requires $hint~ > $hint
172 cygcheck=cygcheck.exe
174 cygcheck="wine $cygwin_prefix/bin/cygcheck.exe"
176 echo "#auto-requires: $(cd usr; auto_requires)" >> $hint
178 grep ^build-requires: $hint || echo "build-requires: $build_depends" >> $hint
184 # Fix up installation slightly
187 chmod -R u+w,og-w,a+rX .
188 cd usr 2>/dev/null && dousrstuff
190 # Split off any sub-packages. The actual splitting is handled by
191 # a package's specific code in extra/.
193 # To package `foo' in foo, foo-doc and foo-devel, set
194 # sub_packages='doc devel'.
196 # Then provide functions doc_name and devel_name, that return the
197 # full name of the sub-package. Also provide functions doc_split
198 # and devel_split, that mv part of foo's installation in $inst to
199 # the sub-packages' installation roots $inst-doc and $inst-devel.
204 for i in $sub_packages; do
206 cd $inst-$i || exit 1
221 echo creating $tarstem.tar.bz2
225 shint=$src/$cygwin/$name.hint
226 hint=$uploads/setup.hint
228 find * -print | egrep -v '\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|/tags$' | sort | tar -T - --no-recursion --owner=0 --group=0 -cjf $tarstem.tar.bz2
231 for i in $sub_packages; do
233 subload=$uploads/$subname
234 subtarstem=$subload/$subname-$ver
235 shint=$src/$cygwin/$subname.hint
236 hint=$subload/setup.hint
237 depends=$(eval echo '$'${i}_depends)
238 mkdir -p $subload || exit 1
239 echo creating $subtarstem.tar.bz2
243 grep ^external-source: $hint || echo "external-source: $base" >> $hint
245 find * -print | egrep -v '\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|/tags$' | sort | tar -T - --no-recursion --owner=0 --group=0 -cjf $subtarstem.tar.bz2
250 echo creating "$tarstem"-src.tar.bz2
251 ##find $package_src/* -print -follow | egrep -v '\.cvsignore|\.bak$|\.orig$|\.o$|~$|^.#|CVS|%redact|/tags$' | egrep -v "$src_exclude" | sort | tar -T - --no-recursion --owner=0 --group=0 -cjf "$tarstem"-src.tar.bz2
252 find $package_src/* -print | egrep -v '\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|%redact|/tags$|/TAGS$|autom4te.cache$' | egrep -v "$src_exclude" | sort | tar -T - --no-recursion --owner=0 --group=0 -cjf "$tarstem"-src.tar.bz2
253 ##cd $package_src && tar -cj --exclude='\.cvsignore' --exclude='\.bak$' --exclude='\.orig$' --exclude='\.o$' --exclude='~$' --exclude='^.#' --exclude='CVS' --exclude='%redact' --exclude='/tags$' --exclude='/TAGS$' --exclude='autom4te.cache' --owner=0 --group=0 -f "$tarstem"-src.tar.bz2 .