blob: 24794c4e9be9b20d1679e4113838e2f53c9c56e0 (
plain) (
blame)
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
|
#! /bin/sh
set -e
warning() {
echo "Kept %%PREFIX%%/etc/%%APP_NAME%%.xml intact from previous installation, please diff"
echo "against %%APP_NAME%%.xml-dist"
}
# Install config file only if none is already there
if test -e %%PREFIX%%/etc/%%APP_NAME%%.xml && \
! cmp -s %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml ; then
echo
echo "********************************************************************************"
warning | fmt -w 80
echo "********************************************************************************"
echo
else
install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml
echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml
fi
# Install new config file with '-dist' appended
install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
install %%WRKSRC%%/conf/app-default.xml %%PREFIX%%/etc/
echo Installed %%PREFIX%%/etc/app-default.xml
install %%WRKDIR%%/resin.sh.in %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
chmod 755 %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
echo Installed %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
install %%WRKSRC%%/bin/wrapper.pl %%PREFIX%%/sbin/%%APP_NAME%%ctl
echo Installed %%PREFIX%%/sbin/%%APP_NAME%%ctl
test -d %%APP_HOME%% || mkdir %%APP_HOME%%
echo Created installation directory %%APP_HOME%%
list()
{
for dir in doc lib libexec xsl ; do
( cd %%WRKSRC%% ; find $dir )
done
}
# Remove all empty dirs
( cd %%WRKSRC%% ; find doc -type d -empty -delete )
echo Installing in %%APP_HOME%%
list | xargs tar -C %%WRKSRC%% -cf- | tar -C %%APP_HOME%% -xpf-
|