Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mkpkg « Solaris « Project - github.com/MediaArea/ZenLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27966a3db3c4b44bf6db34414d380975bab9b3d1 (plain)
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
#!/bin/bash

#Config
user=`id -un`
group=`id -gn`
processor=`uname -p`
kernel=`uname -s`
release=`uname -r`

#Creation of known directories and filenames
name="libzen0"
version="0.4.39"
Home=`pwd`
install_prefix=${Home}/mk_package
packagecreation_prefix=${Home}/create_package
if test -z ${basedir}; then
  basedir="/"
fi

#Common code
. ./mkpkg.sub

#Compile and install
cd ../GNU/Library
./autogen.sh
./configure --prefix=${install_prefix} --enable-shared --disable-static $*
make
if test -e .libs/libzen.so; then
  echo "Compilation OK"
else
  echo "Compilation problem"
  exit 1
fi

#****************************************************************************
# Release 
#****************************************************************************

cd ${Home}
mkdir -p ${install_prefix}

#Copying useful files
install -d -m 755 ${install_prefix}/lib
cp -rP ../GNU/Library/.libs/*.so* ${install_prefix}/lib
install -d -m 755 ${install_prefix}/share/doc/${name}
cp ../../*.txt ${install_prefix}/share/doc/${name}
chmod 644 ${install_prefix}/share/doc/${name}/*.txt

#Creation of package
pkgname="${name}"
PackageCreate

#****************************************************************************
# Devel 
#****************************************************************************

cd ${Home}
mkdir -p ${install_prefix}

#include
install -d -m 755 ${install_prefix}/include/ZenLib
cp ../../Source/ZenLib/*.h ${install_prefix}/include/ZenLib/
chmod 644 ${install_prefix}/include/ZenLib/*.h
install -d -m 755 ${install_prefix}/include/ZenLib/Base64
cp ../../Source/ZenLib/Base64/*.h ${install_prefix}/include/ZenLib/Base64
chmod 644 ${install_prefix}/include/ZenLib/Base64/*.h
install -d -m 755 ${install_prefix}/include/ZenLib/HTTP_Client
cp ../../Source/ZenLib/HTTP_Client/*.h ${install_prefix}/include/ZenLib/HTTP_Client
chmod 644 ${install_prefix}/include/ZenLib/HTTP_Client/*.h
install -d -m 755 ${install_prefix}/include/ZenLib/Format/Html
cp ../../Source/ZenLib/Format/Html/*.h ${install_prefix}/include/ZenLib/Format/Html
chmod 644 ${install_prefix}/include/ZenLib/Format/Html/*.h
install -d -m 755 ${install_prefix}/include/ZenLib/Format/Http
cp ../../Source/ZenLib/Format/Http/*.h ${install_prefix}/include/ZenLib/Format/Http
chmod 644 ${install_prefix}/include/ZenLib/Format/Http/*.h
install -d -m 755 ${install_prefix}/include/ZenLib/TinyXml
cp ../../Source/ZenLib/TinyXml/*.h ${install_prefix}/include/ZenLib/TinyXml
chmod 644 ${install_prefix}/include/ZenLib/TinyXml/*.h
install -d -m 755 ${install_prefix}/bin
cp ../GNU/Library/libzen-config ${install_prefix}/bin
chmod 755 ${install_prefix}/bin/*

#depend file
mkdir -p ${packagecreation_prefix}
echo "P ${name}" > ${packagecreation_prefix}/depend

pkgname="${name}-devel"
PackageCreate

exit 0

#hints
#install: pkgadd -R /opt/libzen0 -d./ libzen0
#remove: pkgrm libzen0, remove /var/spool/name/libzen0