File: mkpkg

package info (click to toggle)
libmediainfo 0.7.70-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,220 kB
  • ctags: 16,696
  • sloc: cpp: 157,850; ansic: 4,082; xml: 1,264; cs: 944; java: 719; python: 565; sh: 345; makefile: 260; pascal: 195
file content (108 lines) | stat: -rwxr-xr-x 3,381 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/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="libmediainfo0"
version="0.7.70"
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
./configure --prefix=${install_prefix} --enable-shared --disable-static $*
make
if test -e .libs/libmediainfo.so; then
  echo "Compilation OK"
else
  echo "Compilation problem"
  exit 1
fi

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

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

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

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

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


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

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

#include
#include
install -d -m 755 ${install_prefix}/include/MediaInfo
cp ../../Source/MediaInfo/MediaInfo.h ${install_prefix}/include/MediaInfo/
cp ../../Source/MediaInfo/MediaInfoList.h ${install_prefix}/include/MediaInfo/
cp ../../Source/MediaInfo/MediaInfo_Const.h ${install_prefix}/include/MediaInfo/
chmod 644 ${install_prefix}/include/MediaInfo/*
install -d -m 755 ${install_prefix}/include/MediaInfoDLL
cp ../../Source/MediaInfoDLL/MediaInfoDLL.cs ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL.h ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL_Static.h ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL.JNA.java ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL.JNative.java ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL.py ${install_prefix}/include/MediaInfoDLL/
cp ../../Source/MediaInfoDLL/MediaInfoDLL3.py ${install_prefix}/include/MediaInfoDLL/
chmod 644 ${install_prefix}/include/MediaInfoDLL/*
#bin
install -d -m 755 ${install_prefix}/bin
cp ../GNU/Library/libmediainfo-config ${install_prefix}/bin
chmod 755 ${install_prefix}/bin/*
#doc
install -d -m 755 ${install_prefix}/share/doc/libmediainfo-devel/Example
cp ../../Source/Example/HowToUse_Dll* ${install_prefix}/share/doc/libmediainfo-devel/Example
chmod 644 ${install_prefix}/share/doc/libmediainfo-devel/Example/*

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

pkgname="${name}-devel"
PackageCreate


exit 0

#hints
#install: pkgadd -d./ libmediainfo0
#remove: pkgrm libmediainfo0, remove /var/spool/pkg/libzen0