File: move_files

package info (click to toggle)
openldap2 2.1.30-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,320 kB
  • ctags: 9,329
  • sloc: ansic: 127,414; sh: 18,958; cpp: 3,897; sql: 1,490; makefile: 1,221; perl: 843
file content (84 lines) | stat: -rw-r--r-- 2,148 bytes parent folder | download
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
73
74
75
76
77
78
79
80
81
82
83
84
#! /bin/sh

set -e

# Move the files of the complete installation into the appropriate 
# packages.

install_stuff() {
  from=debian/tmp
  to=debian/$target

  while [ "$#" -ge 1 ]; do
    dir="`dirname $1`"
    name="`basename $1`"

    mkdir -p $to/$dir
    mv $from/$dir/$name $to/$dir/
    shift
  done
}

check_completeness() {
  missing=`find debian/tmp -not -type d|wc -w`
  if [ "$missing" -gt 0 ]; then
    echo "There are $missing files missing from the resulting package set: "
    find debian/tmp -not -type d
    exit 1
  fi
}

echo -n "Removing default configuration files... "
find debian/tmp -name \*.default|xargs rm
echo done

echo -n "Removing broken .la files... "
find debian/tmp -name \*.la|xargs rm
echo done

echo -n "Removing static backend archives... "
rm debian/tmp/usr/lib/ldap/back_*.a
echo done

#echo -n "Installing: slapd"
#target=slapd
#install_stuff usr/sbin
#install_stuff usr/lib/ldap
#install_stuff usr/share/man/man5/slapd*
#install_stuff usr/share/man/man8
#install_stuff etc/ldap/schema
#install_stuff usr/share/ldap/ucdata
#rm -f debian/tmp/etc/ldap/slapd.conf
#mkdir -p debian/slapd/usr/share/slapd
#install -m644 debian/slapd.conf debian/slapd/usr/share/slapd/slapd.conf
#install -m755 debian/fix_ldif debian/slapd/usr/share/slapd/fix_ldif
#install -m755 debian/ldiftopasswd debian/slapd/usr/share/slapd/ldiftopasswd

#target=ldap-utils
#echo -n " $target"
## slappasswd is useful even without the server
#install -m755 -d debian/$target/usr/sbin
#mv debian/slapd/usr/sbin/slappasswd debian/$target/usr/sbin/
#install_stuff usr/bin
#install_stuff usr/share/man/man1
#install_stuff usr/share/man/man5/ldif*

target=libldap2
echo -n "Installing: $target"
install_stuff etc/ldap/ldap*.conf
install_stuff usr/share/man/man5/ldap.conf*
( cd debian/tmp/usr/lib && \
  	  ln -sf libldap_r.so.? libldap.so.? && \
  	  ln -sf libldap_r.so.?.?.??? libldap.so.?.?.???
)
install_stuff usr/lib/*.so.*

target=libldap2-dev
echo -n " $target"
install_stuff usr/include
ln -sf libldap_r.a debian/tmp/usr/lib/libldap.a
install_stuff usr/lib/*.so usr/lib/*.a
install_stuff usr/share/man/man3
echo "."

#check_completeness