root/trunk/digitalme/SpecBuild.cmake @ 2563

Revision 2563, 3.4 kB (checked in by ahodgkinson, 17 months ago)

digitalme: Added SpecBuild?.cmake and reset external revisions to HEAD.

Line 
1#------------------------------------------------------------------------------
2# Desc: Script for building an RPM spec file
3# Tabs: 3
4#
5# Copyright (c) 2007-2009 Novell, Inc. All Rights Reserved.
6#
7# This program and the accompanying materials are made available
8# under, alternatively, the terms of:  a) the Eclipse Public License v1.0
9# which accompanies this distribution, and is available at
10# http://www.eclipse.org/legal/epl-v10.html; or, b) the Apache License,
11# Version 2.0 which accompanies this distribution and is available at
12# www.opensource.org/licenses/apache2.0.php.
13#
14# To contact Novell about this file by physical or electronic mail,
15# you may find current contact information at www.novell.com.
16#
17# Author: Andrew Hodgkinson <ahodgkinson@novell.com>
18#------------------------------------------------------------------------------
19
20# Sanity checks
21
22if( NOT SPEC_FILE)
23        message( FATAL_ERROR "SPEC_FILE variable has not been defined.")
24endif( NOT SPEC_FILE)
25
26if( NOT PACKAGE_VERSION)
27        message( FATAL_ERROR "PACKAGE_VERSION variable has not been defined.")
28endif( NOT PACKAGE_VERSION)
29
30if( NOT PRODUCT_INSTALL_PREFIX)
31        message( FATAL_ERROR "PRODUCT_INSTALL_PREFIX variable has not been defined.")
32endif( NOT PRODUCT_INSTALL_PREFIX)
33
34set( PROJECT_NAME "digitalme")
35
36# Create the file
37
38FILE( WRITE ${SPEC_FILE}        "Summary: DigitalMe\n")
39FILE( APPEND ${SPEC_FILE}       "Name: ${PROJECT_NAME}\n")
40FILE( APPEND ${SPEC_FILE}       "Version: ${PACKAGE_VERSION}\n")
41FILE( APPEND ${SPEC_FILE}       "Release: 1.1\n")
42FILE( APPEND ${SPEC_FILE}       "License: Eclipse Public License, see http://www.eclipse.org/legal\n")
43FILE( APPEND ${SPEC_FILE}       "Group: Productivity/Security\n")
44FILE( APPEND ${SPEC_FILE}       "Source: ${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz\n")
45FILE( APPEND ${SPEC_FILE}       "BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root\n")
46FILE( APPEND ${SPEC_FILE}       "BuildRequires: cmake >= 2.4 gcc-c++ libglade2-devel >= 2.5 openssl-devel >= 0.9.7 gnome-keyring-devel >= 0.4 make >= 3.8 unzip zip tar\n")
47FILE( APPEND ${SPEC_FILE}       "Requires: openssl >= 0.9.7 gnome-keyring >= 0.4 gtk2 >= 2.8 libglade2 >= 2.5\n")
48FILE( APPEND ${SPEC_FILE}       "\n")
49
50FILE( APPEND ${SPEC_FILE}       "%description\n")
51FILE( APPEND ${SPEC_FILE}       "A Microsoft CardSpace compatible identity selector\n")
52FILE( APPEND ${SPEC_FILE}       "\n")
53
54FILE( APPEND ${SPEC_FILE}       "%prep\n")
55FILE( APPEND ${SPEC_FILE}       "%setup -q\n")
56FILE( APPEND ${SPEC_FILE}       "\n")
57
58FILE( APPEND ${SPEC_FILE}       "%build\n")
59FILE( APPEND ${SPEC_FILE}       "./configure -DPROJECT_VERSION=${PACKAGE_VERSION} -DPRODUCT_INSTALL_PREFIX=${PRODUCT_INSTALL_PREFIX} -DDISABLE_SOURCE_INSTALL=YES\n")
60FILE( APPEND ${SPEC_FILE}       "make\n")
61FILE( APPEND ${SPEC_FILE}       "\n")
62
63FILE( APPEND ${SPEC_FILE}       "%install\n")
64FILE( APPEND ${SPEC_FILE}       "make install DESTDIR=$RPM_BUILD_ROOT\n")
65FILE( APPEND ${SPEC_FILE}       "\n")
66
67FILE( APPEND ${SPEC_FILE}       "%files -f install_manifest.txt\n")
68FILE( APPEND ${SPEC_FILE}       "%dir ${PRODUCT_INSTALL_PREFIX}/lib/${PROJECT_NAME}\n")
69FILE( APPEND ${SPEC_FILE}       "%dir ${PRODUCT_INSTALL_PREFIX}/share/${PROJECT_NAME}\n")
70FILE( APPEND ${SPEC_FILE}       "%dir ${PRODUCT_INSTALL_PREFIX}/share/${PROJECT_NAME}/certs\n")
71FILE( APPEND ${SPEC_FILE}       "%defattr\(-,root,root\)\n")
72FILE( APPEND ${SPEC_FILE}       "\n")
73
74FILE( APPEND ${SPEC_FILE}       "%post\n")
75FILE( APPEND ${SPEC_FILE}       "\n")
76
77FILE( APPEND ${SPEC_FILE}       "%preun\n")
78FILE( APPEND ${SPEC_FILE}       "\n")
Note: See TracBrowser for help on using the browser.