File: installfiles

package info (click to toggle)
cracklib2 2.7-8
  • links: PTS
  • area: main
  • in suites: potato
  • size: 424 kB
  • ctags: 113
  • sloc: ansic: 1,914; sh: 1,084; makefile: 166; perl: 63
file content (255 lines) | stat: -rw-r--r-- 7,163 bytes parent folder | download | duplicates (2)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#!/bin/sh
#
# source:
#   /var/cvs/projects/debian/cracklib/debian/dpkg.scripts/installfiles,v
#
# revision:
#   @(#) installfiles,v 1.2 1999/04/02 14:48:53 jplejacq Exp
#
# copyright:
#   Copyright (C) 1998, 1999 Jean Pierre LeJacq <jplejacq@quoininc.com>
#
#   Distributed under the GNU GENERAL PUBLIC LICENSE.
#
# synopsis:
#   . installfiles
#
# description:
#   Install package files
#
#
#   This program is package dependent.


install_files_override()
# postconditions:
#   Return 0 if successful, non-zero if not.
#
# description:
#   Installs files into final debian location.
{
  if   [ "${pkglib}" = "${DH_DOPACKAGES}" ]
  then
    #
    # Install standard files.
    #
    (
      d_pkg_doc="${d_pkglib_doc}"
      f_pkg_docbase="${f_pkglib_docbase}"
      f_pkg_menu="${f_pkglib_menu}"
      l_pkg_menu="${l_pkglib_menu}"
      l_pkg_doc="${l_pkglib_doc}"
      l_pkg_docbase="${l_pkglib_docbase}"

      install_files
    )


    readonly rules_srcdir="${DH_DOPACKAGES}.src"


    echo "${0}: debian package files: install..."
      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.index.html\
        ${DH_TMPDIR}${d_pkglib_doc}/index.html


    echo "${0}: package files: installing..."
      install -m 0644\
        ${rules_srcdir}/HISTORY\
        ${DH_TMPDIR}${d_pkglib_doc}/changelog
      install -m 0644\
        ${rules_srcdir}/README\
        ${DH_TMPDIR}${d_pkglib_doc}/README
      install -m 0644\
        ${rules_srcdir}/cracklib/libcrack.so.${ver}\
        ${DH_TMPDIR}${d_pkglib_lib}/libcrack.so.${ver}


    echo "${0}: package files: linking..."
      ln -s\
        libcrack.so.${ver}\
        ${DH_TMPDIR}${d_pkglib_lib}/libcrack.so.${ver_major}


    echo "${0}: package files: compressing..."
      gzip -9 ${DH_TMPDIR}${d_pkglib_doc}/README
      gzip -9 ${DH_TMPDIR}${d_pkglib_doc}/changelog
  elif [ "${pkgdev}" = "${DH_DOPACKAGES}" ]
  then
    #
    # Install standard files.
    #
    (
      d_pkg_doc="${d_pkgdev_doc}"
      f_pkg_docbase="${f_pkgdev_docbase}"
      f_pkg_menu="${f_pkgdev_menu}"
      l_pkg_menu="${l_pkgdev_menu}"
      l_pkg_doc="${l_pkgdev_doc}"
      l_pkg_docbase="${l_pkgdev_docbase}"

      install_files
    )


    readonly rules_srcdir="${DH_DOPACKAGES}.src"


    echo "${0}: debian package files: install..."
      install -m 0644\
      debian/dpkg.src/${DH_DOPACKAGES}.crack.h\
      ${DH_TMPDIR}${d_pkgdev_include}/crack.h

      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.index.html\
        ${DH_TMPDIR}${d_pkgdev_doc}/index.html
      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.cracklib_example.c\
        ${DH_TMPDIR}${d_pkgdev_doc_examples}/cracklib_example.c
      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.makefile\
        ${DH_TMPDIR}${d_pkgdev_doc_examples}/makefile

      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.FascistCheck.3\
        ${DH_TMPDIR}${d_pkgdev_man}/man3/FascistCheck.3


    echo "${0}: package files: installing..."
      install -m 0644\
        ${rules_srcdir}/HISTORY\
        ${DH_TMPDIR}${d_pkgdev_doc}/changelog

      install -m 0644\
        ${rules_srcdir}/cracklib/libcrack.a\
        ${DH_TMPDIR}${d_pkgdev_lib}/libcrack.a


    echo "${0}: package files: linking..."
      #
      # I'm not putting the normally directory specifier here but
      # instead assuming that l_pkgdev_pkglib_relative_lib contains
      # it.  This is to allow l_pkgdev_pkglib_relative_lib to be
      # empty.
      ln -s\
        ${l_pkgdev_pkglib_relative_lib}libcrack.so.${ver}\
        ${DH_TMPDIR}${d_pkgdev_lib}/libcrack.so

      ln -f -s\
        FascistCheck.3.gz\
        ${DH_TMPDIR}${d_pkgdev_man}/man3/cracklib.3.gz


    echo "${0}: package files: compressing..."
      gzip -9 ${DH_TMPDIR}${d_pkgdev_doc}/changelog
      gzip -9 ${DH_TMPDIR}${d_pkgdev_man}/man3/FascistCheck.3
  elif [ "${pkgruntime}" = "${DH_DOPACKAGES}" ]
  then
    #
    # Install standard files.
    #
    (
      d_pkg_doc="${d_pkgruntime_doc}"
      f_pkg_docbase="${f_pkgruntime_docbase}"
      f_pkg_menu="${f_pkgruntime_menu}"
      l_pkg_menu="${l_pkgruntime_menu}"
      l_pkg_doc="${l_pkgruntime_doc}"
      l_pkg_docbase="${l_pkgruntime_docbase}"

      install_files
    )


    readonly rules_srcdir="${pkgruntime}.src"


    echo "${0}: debian package files: install..."
      install -m 0755\
        debian/dpkg.src/${DH_DOPACKAGES}.cron.daily\
        ${DH_TMPDIR}${f_pkgruntime_etc_crondaily}
      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.conf\
        ${DH_TMPDIR}${f_pkgruntime_etc_conf}

      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.index.html\
        ${DH_TMPDIR}${d_pkgruntime_doc}/index.html

      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.crack_mkdict.8\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_mkdict.8
      install -m 0644\
        debian/dpkg.src/${DH_DOPACKAGES}.crack_teststr.8\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_teststr.8


    echo "${0}: package files: installing..."
      install -m 0644\
        ${rules_srcdir}/HISTORY\
        ${DH_TMPDIR}${d_pkgruntime_doc}/changelog

      install -m 0755\
        ${rules_srcdir}/util/mkdict\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_mkdict
      install -m 0755\
        ${rules_srcdir}/util/packer\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_packer
      install -m 0755\
        ${rules_srcdir}/util/testlib\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_testlib
      install -m 0755\
        ${rules_srcdir}/util/testnum\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_testnum
      install -m 0755\
        ${rules_srcdir}/util/teststr\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_teststr
      install -m 0755\
        ${rules_srcdir}/util/unpacker\
        ${DH_TMPDIR}${d_pkgruntime_bin_s}/crack_unpacker


    echo "${0}: package files: linking..."
      ln -f -s\
        crack_mkdict.8.gz\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_packer.8.gz
      ln -f -s\
        crack_mkdict.8.gz\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_unpacker.8.gz
      ln -f -s\
        crack_teststr.8.gz\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_testlib.8.gz
      ln -f -s\
        crack_teststr.8.gz\
        ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_testnum.8.gz


      if [ "${d_pkgruntime_doc}" != "${l_pkgruntime_doc}" ]
      then
        ln -f -s ${d_pkgruntime_doc} ${DH_TMPDIR}${l_pkgruntime_doc}
      fi

      if [ "${f_pkgruntime_docbase}" != "${l_pkgruntime_docbase}" ]
      then
        ln -f -s ${f_pkgruntime_docbase} ${DH_TMPDIR}${l_pkgruntime_docbase}
      fi

      if [ "${f_pkgruntime_etc_crondaily}" != "${l_pkgruntime_etc_crondaily}" ]
      then
        ln -f -s\
          ${f_pkgruntime_etc_crondaily}\
          ${DH_TMPDIR}${l_pkgruntime_etc_crondaily}
      fi


    echo "${0}: package files: compressing..."
      gzip -9 ${DH_TMPDIR}${d_pkgruntime_doc}/changelog
      gzip -9 ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_mkdict.8
      gzip -9 ${DH_TMPDIR}${d_pkgruntime_man}/man8/crack_teststr.8
  else
    echo "${0}: unknown package..."
    exit 1
  fi


  return 0
}