summaryrefslogtreecommitdiffstats
path: root/Utilities/cmake_release_cygwin.sh
blob: 569462706e1645f3613cb7fc050036bda6782da3 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/sh
#
# CMake Cygwin package creation script.  Run this in an empty
# directory from a separate CMake checkout.
#

CVS_TAG="-r Release-1-4"
PKG=cmake
VER=1.4.6
REL=1
PREVER=1.4.5
PREREL=1

CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
FULLPKG="${PKG}-${VER}-${REL}"

SELF_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`

WriteREADME()
{
CYGVERSION=`uname -r`
cat > ${PKG}-${VER}/CYGWIN-PATCHES/cmake.README <<EOF
cmake
--------------------------------------
Runtime requirements:
  cygwin-${CYGVERSION} or newer

Build requirements
  cygwin-${CYGVERSION} or newer
  make

Canonical homepage:
  http://www.cmake.org

Canonical download:
  ftp://www.cmake.org/pub/cmake/

------------------------------------

Build instructions:
  unpack ${FULLPKG}-src.tar.bz2
    if you use setup to install this src package, it will be
	 unpacked under /usr/src automatically
  cd /usr/src
  ./${FULLPKG}.sh all

This will create:
  /usr/src/${FULLPKG}.tar.bz2
  /usr/src/${FULLPKG}-src.tar.bz2

-------------------------------------------

Port Notes:

<none>

------------------

Cygwin port maintained by: CMake Developers <cmake@www.cmake.org>

EOF
}

WriteSetupHint()
{
cat > ${PKG}-${VER}/CYGWIN-PATCHES/setup.hint <<EOF
# CMake setup.hint file for cygwin setup.exe program
category: Devel 
requires: libncurses6 cygwin 
sdesc: "A cross platform build manger" 
ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files." 
prev: ${PREVER}-${PREREL}
curr: ${VER}-${REL}
EOF
dos2unix ${PKG}-${VER}/CYGWIN-PATCHES/setup.hint
cp ${PKG}-${VER}/CYGWIN-PATCHES/setup.hint ./setup.hint
}

SourceTarball()
{
  cvs -z3 -d ${CVSROOT} export ${CVS_TAG} CMake &&
  mv CMake ${PKG}-${VER} &&
  tar cvjf ${PKG}-${VER}.tar.bz2 ${PKG}-${VER}
}

SourcePatch()
{
  mv ${PKG}-${VER} ${PKG}-${VER}-orig &&
  tar xvjf ${PKG}-${VER}.tar.bz2 &&
  mkdir -p ${PKG}-${VER}/CYGWIN-PATCHES &&
  WriteREADME &&
  WriteSetupHint &&
  (diff -urN "${PKG}-${VER}-orig" "${PKG}-${VER}" > "${FULLPKG}.patch")
  rm -rf ${PKG}-${VER} ${PKG}-${VER}-orig
}

CygwinScript()
{
  cp ${SELF_DIR}/cmake-cygwin-package.sh ./${FULLPKG}.sh
  chmod u+x ./${FULLPKG}.sh
}

Package()
{
  ./${FULLPKG}.sh all
}

SourceTarball && SourcePatch && CygwinScript && Package