~ubuntu-branches/ubuntu/vivid/oss4/vivid

« back to all changes in this revision

Viewing changes to .pc/txt2man.patch/setup/Linux/build.sh

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. ./.directories
 
4
 
 
5
if gawk '' >/dev/null
 
6
then
 
7
   TXT2MAN=$SRCDIR/setup/txt2man
 
8
else
 
9
   echo "No gawk found. Using lesser replacement" >&2
 
10
   cc -o txt2man origdir/setup/txt2man.c
 
11
   TXT2MAN=./txt2man
 
12
fi
 
13
 
 
14
rm -rf prototype
 
15
 
 
16
mkdir prototype
 
17
mkdir prototype/etc
 
18
echo "OSSLIBDIR=$OSSLIBDIR" > prototype/etc/oss.conf
 
19
mkdir prototype/usr
 
20
mkdir prototype/usr/bin
 
21
mkdir prototype/usr/share
 
22
mkdir prototype/usr/share/man
 
23
mkdir prototype/usr/share/man/man1
 
24
mkdir prototype/usr/share/man/man7
 
25
mkdir prototype/usr/share/man/man8
 
26
mkdir prototype/usr/sbin
 
27
mkdir -p prototype/$OSSLIBDIR
 
28
mkdir prototype/$OSSLIBDIR/etc
 
29
mkdir prototype/$OSSLIBDIR/save
 
30
mkdir prototype/$OSSLIBDIR/conf.tmpl
 
31
mkdir prototype/$OSSLIBDIR/lib
 
32
mkdir prototype/$OSSLIBDIR/modules.regparm
 
33
mkdir prototype/$OSSLIBDIR/modules.noregparm
 
34
mkdir prototype/$OSSLIBDIR/objects.regparm
 
35
mkdir prototype/$OSSLIBDIR/objects.noregparm
 
36
mkdir prototype/$OSSLIBDIR/include
 
37
mkdir prototype/$OSSLIBDIR/include/sys
 
38
mkdir prototype/$OSSLIBDIR/include/internals
 
39
mkdir prototype/$OSSLIBDIR/build
 
40
 
 
41
chmod 700 prototype/$OSSLIBDIR/modules.*
 
42
chmod 700 prototype/$OSSLIBDIR/objects.*
 
43
chmod 700 prototype/$OSSLIBDIR/build
 
44
chmod 700 prototype/$OSSLIBDIR/save
 
45
 
 
46
if test -f regparm && test "`cat regparm` " = "1 "
 
47
then
 
48
  MODULES=modules.regparm
 
49
  OBJECTS=objects.regparm
 
50
else
 
51
  MODULES=modules.noregparm
 
52
  OBJECTS=objects.noregparm
 
53
fi
 
54
 
 
55
cp .version prototype/$OSSLIBDIR/version.dat
 
56
 
 
57
if test "`uname -m` " != "arm "
 
58
then
 
59
        if ! test -f regparm
 
60
        then
 
61
          echo Error: ./regparm is missing
 
62
          exit 1
 
63
        fi
 
64
        cp regparm prototype/$OSSLIBDIR/build
 
65
fi
 
66
 
 
67
# Regenerating the config file templates
 
68
rm -f /tmp/confgen
 
69
if ! cc -o /tmp/confgen ./setup/Linux/confgen.c
 
70
then
 
71
        echo Building confgen failed
 
72
        exit 1
 
73
fi
 
74
 
 
75
if ! /tmp/confgen prototype/$OSSLIBDIR/conf.tmpl $OSSLIBDIR/conf kernel/drv/* kernel/nonfree/drv/*
 
76
then
 
77
        echo Running confgen failed
 
78
        exit 1
 
79
fi
 
80
 
 
81
rm -f /tmp/confgen
 
82
 
 
83
cp $SRCDIR/include/*.h prototype/$OSSLIBDIR/include/sys/
 
84
cp $SRCDIR/kernel/framework/include/midiparser.h prototype/$OSSLIBDIR/include/
 
85
cp -f $SRCDIR/kernel/OS/Linux/wrapper/wrap.h prototype/$OSSLIBDIR/build/
 
86
cp -f $SRCDIR/kernel/framework/include/udi.h prototype/$OSSLIBDIR/build/
 
87
cp -a $SRCDIR/kernel/framework/include/*_core.h kernel/framework/include/local_config.h prototype/$OSSLIBDIR/include/internals
 
88
cp $SRCDIR/kernel/framework/include/ossddk/*.h prototype/$OSSLIBDIR/include/internals
 
89
cp kernel/framework/include/timestamp.h prototype/$OSSLIBDIR/include/internals
 
90
cp kernel/framework/include/ossddk/oss_limits.h prototype/$OSSLIBDIR/include/internals
 
91
 
 
92
cat > prototype/$OSSLIBDIR/include/internals/WARNING.txt << EOF
 
93
Caution: All header files included in this directory are there only because
 
94
         some parts of OSS may need to be re-compiled. It is not safe to use
 
95
         these files for any purposes because they will change between OSS
 
96
         versions/builds.
 
97
EOF
 
98
 
 
99
(cd target/bin; rm -f ossrecord; ln -s ossplay ossrecord)
 
100
cp -f target/build/* prototype/$OSSLIBDIR/build/
 
101
cp -f target/bin/* prototype/usr/bin
 
102
cp -f target/sbin/* prototype/usr/sbin
 
103
 
 
104
cp -a $SRCDIR/setup/Linux/oss/* prototype/$OSSLIBDIR/
 
105
cp -a $SRCDIR/setup/Linux/sbin prototype/usr/
 
106
chmod +x prototype/$OSSLIBDIR/scripts/*
 
107
 
 
108
if ! ld -r -o prototype/$OSSLIBDIR/$OBJECTS/osscore.o target/objects/*.o
 
109
then
 
110
  echo Linking osscore failed!
 
111
  exit 1
 
112
fi
 
113
 
 
114
rm -f devlist.txt devices.list
 
115
 
 
116
for n in `find kernel/ -name .devices`
 
117
do
 
118
  cat $n >> devices.list
 
119
done
 
120
 
 
121
for n in target/modules/*.o
 
122
do
 
123
        N=`basename $n .o`
 
124
        ld -r -o prototype/$OSSLIBDIR/$MODULES/$N.o $n
 
125
        echo Check devices for $N
 
126
        grep "^$N[      ]" ./devices.list >> devlist.txt
 
127
 
 
128
        rm -f /tmp/ossman.txt
 
129
 
 
130
        if test -f $SRCDIR/kernel/drv/$N/$N.man
 
131
        then
 
132
          sed "s:CONFIGFILEPATH:$OSSLIBDIR/conf:g" < $SRCDIR/kernel/drv/$N/$N.man > /tmp/ossman.txt
 
133
          $TXT2MAN -t "$CMD" -v "OSS Devices" -s 7 /tmp/ossman.txt | gzip -9 > prototype/usr/share/man/man7/$N.7.gz
 
134
        else
 
135
                if test -f $SRCDIR/kernel/nonfree/drv/$N/$N.man
 
136
                then
 
137
                        sed "s:CONFIGFILEPATH:$OSSLIBDIR/conf:g" < $SRCDIR/kernel/nonfree/drv/$N/$N.man > /tmp/ossman.txt
 
138
                        $TXT2MAN -t "$CMD" -v "OSS Devices" -s 7 $SRCDIR/kernel/nonfree/drv/$N/$N.man | gzip -9 > prototype/usr/share/man/man7/$N.7.gz
 
139
                fi
 
140
        fi
 
141
done
 
142
 
 
143
sed "s:CONFIGFILEPATH:$OSSLIBDIR/conf:g" < $SRCDIR/kernel/drv/osscore/osscore.man > /tmp/ossman.txt
 
144
$TXT2MAN -t "osscore" -v "OSS Devices" -s 7 /tmp/ossman.txt | gzip -9 > prototype/usr/share/man/man7/osscore.7.gz
 
145
rm -f /tmp/ossman.txt
 
146
 
 
147
# Link the optional NOREGPARM modules
 
148
if test -d noregparm
 
149
then
 
150
   ld -r -o prototype/$OSSLIBDIR/objects.noregparm/osscore.o noregparm/target/objects/*.o
 
151
 
 
152
   for n in noregparm/target/modules/*.o
 
153
   do
 
154
        N=`basename $n .o`
 
155
        ld -r -o prototype/$OSSLIBDIR/modules.noregparm/$N.o $n
 
156
   done
 
157
fi
 
158
 
 
159
for n in $SRCDIR/misc/man7/*.man
 
160
do
 
161
        N=`basename $n .man`
 
162
 
 
163
        $TXT2MAN -t "$CMD" -v "OSS Devices" -s 7 $n | gzip -9 > prototype/usr/share/man/man7/$N.7.gz
 
164
done
 
165
 
 
166
for n in $SRCDIR/misc/man1m/*.man
 
167
do
 
168
        N=`basename $n .man`
 
169
        $TXT2MAN -t "$CMD" -v "OSS System Administration Commands" -s 1 $n | gzip -9 > prototype/usr/share/man/man1/$N.1.gz
 
170
done
 
171
 
 
172
if ! cp lib/libOSSlib/libOSSlib.so lib/libsalsa/.libs/libsalsa.so.2.0.0 prototype/$OSSLIBDIR/lib
 
173
then
 
174
  echo Warning: No libsalsa library compiled
 
175
fi
 
176
 
 
177
cp target/lib/* prototype/$OSSLIBDIR/lib
 
178
 
 
179
cp devlist.txt prototype/$OSSLIBDIR/etc/devices.list
 
180
 
 
181
if test -d kernel/nonfree
 
182
then
 
183
        cp devlist.txt $SRCDIR/devlists/Linux
 
184
fi
 
185
 
 
186
# Generate Man pages for commands
 
187
for i in target/bin/*
 
188
do
 
189
CMD=`basename $i`
 
190
$TXT2MAN -t "$CMD" -v "OSS User Commands" -s 1 cmd/$CMD/$CMD.man | gzip -9 > prototype/usr/share/man/man1/$CMD.1.gz
 
191
echo done $CMD
 
192
done
 
193
 
 
194
for i in target/sbin/*
 
195
do
 
196
  CMD=`basename $i`
 
197
  if test -f cmd/$CMD/$CMD.man
 
198
  then
 
199
        $TXT2MAN -t "$CMD" -v "OSS System Administration Commands" -s 8 cmd/$CMD/$CMD.man | gzip -9 > prototype/usr/share/man/man8/$CMD.8.gz
 
200
        echo done $CMD
 
201
  fi
 
202
done
 
203
 
 
204
$TXT2MAN -t "ossdetect" -v "User Commands" -s 8 os_cmd/Linux/ossdetect/ossdetect.man | gzip -9 > prototype/usr/share/man/man8/ossdetect.8.gz
 
205
echo done ossdetect
 
206
 
 
207
cp -f $SRCDIR/oss/lib/flashsupport.c prototype/$OSSLIBDIR/lib
 
208
 
 
209
# Licensing stuff
 
210
if test -f 4front-private/osslic.c
 
211
then
 
212
        cc -o prototype/usr/sbin/osslic -Isetup -Ikernel/nonfree/include -Ikernel/framework/include -Iinclude -Ikernel/OS/Linux -I$SRCDIR $SRCDIR/4front-private/osslic.c
 
213
        strip prototype/usr/sbin/osslic
 
214
        
 
215
        BITS=3 # Default to 32 bit ELF format
 
216
        if test "`uname -m` " = "x86_64 "
 
217
        then
 
218
           BITS=6 # Use 64 bit ELF format
 
219
        fi
 
220
        prototype/usr/sbin/osslic -q -u -$BITS./prototype/$OSSLIBDIR/objects.regparm/osscore.o
 
221
        prototype/usr/sbin/osslic -q -u -$BITS./prototype/$OSSLIBDIR/objects.noregparm/osscore.o
 
222
        
 
223
fi
 
224
 
 
225
if test -f 4front-private/ossupdate.c
 
226
then
 
227
  #ossupdate
 
228
  cc -I. 4front-private/ossupdate.c -s -o prototype/usr/sbin/ossupdate
 
229
fi
 
230
 
 
231
sh $SRCDIR/setup/build_common.sh $SRCDIR $OSSLIBDIR
 
232
 
 
233
chmod 700 prototype/usr/sbin/*
 
234
chmod 755 prototype/usr/bin/*
 
235
 
 
236
(cd prototype;ls usr/sbin/* usr/bin/* etc/* usr/share/man/man*/*) > prototype/$OSSLIBDIR/sysfiles.list
 
237
 
 
238
exit 0