5807
|
1 |
#
|
|
2 |
# spec file for package [package-name]
|
|
3 |
#
|
|
4 |
# Copyright (c) 2005 Sun Microsystems, Inc.
|
|
5 |
# This file and all modifications and additions to the pristine
|
|
6 |
# package are under the same license as the package itself.
|
|
7 |
#
|
|
8 |
|
|
9 |
# Use the base name of the tarball to generate the RPM package name
|
|
10 |
# Exceptions are glib2 and gtk2 [since these are already available under SLEC]
|
|
11 |
|
|
12 |
Name: [package-name]
|
|
13 |
|
|
14 |
# GPL Applications, Utilities and Data
|
|
15 |
# LGPL Libraries
|
|
16 |
# There may be exceptions, so best to check tarball/COPYING file
|
|
17 |
|
|
18 |
License: [package-license]
|
|
19 |
|
|
20 |
# System/Libraries non GNOME specific libraries eg. gtk2, glib2, vte
|
|
21 |
# System/Libraries/GNOME GNOME specific libraries
|
|
22 |
# Development/Libraries non GNOME specific devel libraries eg. gtk2-devel, glib2-devel, vte-devel
|
|
23 |
# Development/Libraries/GNOME GNOME specific
|
|
24 |
# System/GUI non GNOME specific user interface components
|
|
25 |
# System/GUI/GNOME GNOME specific user interface components
|
|
26 |
# There will be exceptions, so use your own judgement eg. intltool, scrollkeeper
|
|
27 |
|
|
28 |
Group: [package-group]
|
|
29 |
|
|
30 |
# Include only if the component doesn't contain any architecture dependant files eg. gnome-icon-theme
|
|
31 |
|
|
32 |
BuildArchitectures: [noarch]
|
|
33 |
|
|
34 |
# The version from the tarball. If updating the spec file for a new tarball version, reset the Release number to 1
|
|
35 |
|
|
36 |
Version: [package-version]
|
|
37 |
|
|
38 |
# Any time you modify the spec file, you need to increment the Release number. New tarball versions should start with
|
|
39 |
# the Release number to 1
|
|
40 |
|
|
41 |
Release: [package-release]
|
|
42 |
|
|
43 |
# Standard values. Do not change.
|
|
44 |
Distribution: Java Desktop System, Release 3
|
|
45 |
|
|
46 |
Vendor: Sun Microsystems, Inc.
|
|
47 |
|
|
48 |
# Should be terse, yet descriptive eg. GNOME Terminal, GNOME Window Manager, Print Library for GNOME, GNOME Component
|
|
49 |
# Library
|
|
50 |
|
|
51 |
Summary: [package-summary]
|
|
52 |
|
|
53 |
# Should represent the location of the bzip2 tarball on ftp.gnome.org
|
|
54 |
# eg. http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.2/%{name}-%{version}.tar.bz2
|
|
55 |
# If further sources are to be added, then should have a SourceN: format, where N = 1, 2, 3 ...
|
|
56 |
|
|
57 |
Source: [package-source]
|
|
58 |
|
|
59 |
# Should represent the component project URL
|
|
60 |
# eg. http://www.gnome.org for GNOME components
|
|
61 |
|
|
62 |
URL: [project-url]
|
|
63 |
|
|
64 |
# Standard value. You should not need to change this.
|
|
65 |
|
|
66 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
67 |
|
|
68 |
# Any files flagged with %doc in the %files directive get installed here. Need to decide if we should use this
|
|
69 |
# for GNOME components or not. README, COPYING, ChangeLog, NEWS are usually typical examples are files being
|
|
70 |
# flagged. Until that decision is made, do not change this.
|
|
71 |
|
|
72 |
Docdir: %{_defaultdocdir}/doc
|
|
73 |
|
|
74 |
# Should represent any patches applied to the original source tarball, where the format is PatchN, N = 1, 2, 3, ...
|
|
75 |
# Do not add if there are no patches.
|
|
76 |
|
|
77 |
Patch1: [package-patch]
|
|
78 |
|
|
79 |
# Standard value. Do not change.
|
|
80 |
|
|
81 |
Autoreqprov: on
|
|
82 |
|
|
83 |
# You generally use %defines for tracking Requires and BuildRequires. If you need to add more %defines, then you'd
|
|
84 |
# better have a good reason. Use '_' where neccessary rather than '-'
|
|
85 |
# eg. %define libgnomeui_version 2.2.1
|
|
86 |
|
|
87 |
%define [package_define] [package_definition]
|
|
88 |
|
|
89 |
# When you need to track runtime dependancies, Requires, use the rule -
|
|
90 |
# o Find the list of packages the application/library links against
|
|
91 |
# o Find the Highest Common Factors
|
|
92 |
# We have been using 'jhbuild dot package' to do this. This also applies for buildtime dependancies,
|
|
93 |
# BuildRequires. There doesn't seem to be a 'correct' solution, so you may have to use your own
|
|
94 |
# judgement here - avoid listing dozens of dependancies.
|
|
95 |
#
|
|
96 |
# eg. libgnomeui
|
|
97 |
# Requires: libbonoboui >= %{libbonoboui_version}
|
|
98 |
# Requires: libglade >= %{libglade_version}
|
|
99 |
# BuildRequires: libbonoboui-devel >= %{libbonoboui_version}
|
|
100 |
# BuildRequires: libglade-devel >= %{libglade_version}
|
|
101 |
# BuildRequires: popt >= %{popt_version}
|
|
102 |
# BuildRequires: gtk-doc >= %{gtk_doc_version}
|
|
103 |
#
|
|
104 |
|
|
105 |
Requires: [package_required] >= [package_required_version]
|
|
106 |
BuildRequires: [package_build_required] >= [package_required_version]
|
|
107 |
|
|
108 |
# Include a paragraph for the description. Be as concise as possible. Do not list authors names or email addresses
|
|
109 |
|
|
110 |
%description
|
|
111 |
[package_description]
|
|
112 |
|
|
113 |
# If your package provides a development package use a terse Summary eg. VTE Terminal Emulation Development Library
|
|
114 |
# The Group should follow the guidelines as above.
|
|
115 |
# Requires should mention the base package, plus any other required headers, right down to glib2. Make sure that you
|
|
116 |
# don't add duplicated requirements eg. gtk2-devel requires glib2, libgnome-devl requires gtk2 but *not* glib2
|
|
117 |
# The description should follow the guidelines as above
|
|
118 |
|
|
119 |
%package devel
|
|
120 |
Summary: [package_summary]
|
|
121 |
Group: [package_group]
|
|
122 |
Requires: %{name} = %{version}
|
|
123 |
Requires: [package_required] >= [package_required_version]
|
|
124 |
|
|
125 |
%description devel
|
|
126 |
[package_devel_description]
|
|
127 |
|
|
128 |
# Standard values. You should not need to change, unless you have good reason eg. the package name is different from
|
|
129 |
# the tarball name.
|
|
130 |
|
|
131 |
%prep
|
|
132 |
%setup -q
|
|
133 |
|
|
134 |
# Include only if you have patches to apply. All patches should be 'p1'. N can be values of 1, 2, 3, ...
|
|
135 |
|
|
136 |
%patchN -p1
|
|
137 |
|
|
138 |
# Standard value. Do not change unless neccessary.
|
|
139 |
# If package contains man pages, add --mandir=%{_mandir}.
|
|
140 |
# If package contains libexec binaries, add --libexec=%{_libexecdir}
|
|
141 |
# If package has specific options, please include
|
|
142 |
#
|
|
143 |
# If package contains gconf schemas, it will be neccessary to disable them until the post-install phase. You
|
|
144 |
# can do this by the following -
|
|
145 |
# export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
|
146 |
# make DESTDIR=$RPM_BUILD_ROOT
|
|
147 |
# unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
|
148 |
|
|
149 |
%build
|
|
150 |
CFLAGS="$RPM_OPT_FLAGS" \
|
|
151 |
./configure --prefix=%{_prefix} \
|
|
152 |
--sysconfdir=%{_sysconfdir}
|
|
153 |
make
|
|
154 |
|
|
155 |
%install
|
|
156 |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
157 |
|
|
158 |
%clean
|
|
159 |
rm -rf $RPM_BUILD_ROOT
|
|
160 |
|
|
161 |
# Include only if package needs some special steps taken eg.
|
|
162 |
#
|
|
163 |
# scrollkeeper-update -q package installs scrollkeeper 'omf' files
|
|
164 |
# package removes scrollkeeper 'omf' files
|
|
165 |
#
|
|
166 |
# /sbin/ldconfig package contains libraries
|
|
167 |
# package removes libraries
|
|
168 |
#
|
|
169 |
# package installs gconf schemas
|
|
170 |
# export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
|
171 |
# SCHEMAS="package.schemas"
|
|
172 |
# for S in $SCHEMAS; do
|
|
173 |
# gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
|
|
174 |
# done
|
|
175 |
|
|
176 |
%post
|
|
177 |
[package_post_install_steps]
|
|
178 |
|
|
179 |
%postun
|
|
180 |
[package_post_uninstall_steps]
|
|
181 |
|
|
182 |
# Should list the files to be packaged into the RPM.
|
|
183 |
# Do not change the 'defattr'.
|
|
184 |
# The base RPM should include binaries, libraries [.so.* only], man pages and other data files.
|
|
185 |
# The devel RPM should include binaries, libraries [.so only], pkgconfig files, developer
|
|
186 |
# documentation, but should not duplicate anything that has been already packaged into the base RPM.
|
|
187 |
# Static libs should not be included in any package unless absolutely necessary.
|
|
188 |
# In that case, include them in the -devel pkg.
|
|
189 |
# Libtool's .la files should not be included in any package.
|
|
190 |
#
|
|
191 |
# Avoid using %{_prefix} and stick to the following macros
|
|
192 |
# {_bindir} /usr/bin
|
|
193 |
# {_libdir} /usr/lib
|
|
194 |
# {_libexecdir} /usr/libexec
|
|
195 |
# {_mandir} /usr/share/man
|
|
196 |
# {_datadir} /usr/share
|
|
197 |
# {_sysconfdir} /etc [note, you need to specify this at the %build stage]
|
|
198 |
# {_includedir} /usr/include
|
|
199 |
#
|
|
200 |
# Use globs where possible eg. %{_bindir}/*
|
|
201 |
#
|
|
202 |
# Do not include directives %doc, %config, %docdir, %verify until we figure out a standard for these.
|
|
203 |
|
|
204 |
%files
|
|
205 |
%defattr(-,root,root)
|
|
206 |
[package_files]
|
|
207 |
|
|
208 |
# Include only if there is a devel package.
|
|
209 |
|
|
210 |
%files devel
|
|
211 |
%defattr(-,root,root)
|
|
212 |
[package_devel_files]
|
|
213 |
|
|
214 |
# Include a changelog entry with correct format eg. * Mon May 26 2004 - [email protected]
|
|
215 |
|
|
216 |
%changelog
|
|
217 |
* [package_changelog_date_author]
|
|
218 |
- [package_changelog_entry]
|