File: README

package info (click to toggle)
cmake-fedora 2.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 764 kB
  • sloc: sh: 1,336; perl: 87; makefile: 12
file content (204 lines) | stat: -rw-r--r-- 5,806 bytes parent folder | download | duplicates (2)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
[[PageOutline]]

= Welcome to cmake-fedora =
cmake-fedora consists a set of scripts and cmake modules that simply the
release process of a *nix software package,  especially for
Fedora and EPEL.

= Motivation =
cmake-fedora is designed to relieve your from chores of releasing software by:
* Keeping the consistency of release information such as version and update
messages in:
* Release notes
* !ChangeLog
* Tags
* Spec file
* Fedpkg commit message
* Bodhi notes
* Source archive depends on the files to be packed.
* Run rpmlint and koji scratch build before tag as sanity checks.
* Easy upload to scp, sftp hosting services sites.
* Translation targets like gettext and Zanata.
* Provide license information and templates of CMakeLists.txt,
    spec files for new packages.

    while avoid some pitfalls like all junk files are packed.

    = Get cmake-fedora =
    == Git ==

{{{
    git clone http://git.fedorahosted.org/git/cmake-fedora.git
  }}}

== Source Archive ==
Source archive download page:
https://fedorahosted.org/releases/c/m/cmake-fedora/

You can download the modules-only archive: cmake-fedora-<version>-modules-only.tar.gz

or the full archive that also include helper scripts and documentation: cmake-fedora-<version>.tar.gz 

= Install =
cmake-fedora can be installed as a Fedora/EPEL package using:
{{{
    yum -y install cmake-fedora
  }}}

Alternatively, you can install cmake-fedora for the package as:
* Git submodule:
{{{
    git submodule init; git submodule update
	ln -s cmake-fedora/Modules .
  }}}
* Extracted Module-only source archives:
{{{
    wget -P SOURCES https://fedorahosted.org/releases/c/m/cmake-fedora/cmake-fedora-modules-only-latest.tar.gz
	tar zxvf SOURCES/cmake-fedora-modules-only-latest.tar.gz")
  }}}


= Work flow =

== Starting a new project ==

=== 1. Edit CMakeLists.txt ====
cmake build instruction file. Edit it as you normally do with CMake projects.
It should contains note that project persistent information like project name, authors, licenses and project summary.

`cmake-fedora-newprj` can create CMakeLists.txt if it does not already exists, and helps to configure the basic
document like AUTHORS and COPYING.

=== 2. Edit RELEASE-NOTES.txt ====
This is file you put the version, change summary, !ChangeLog, Bugzilla Bug ID or anything about the upcoming versions/releases.

It looks like:
{{{
    PRJ_VER=0.1.0
	SUMMARY=Summary of this version
	REDHAT_BUGZILLA=XXXXXXXX,YYYYYYY
	[Changes]
	- Fixed Bug XXXXXXX - bug description
	- Fixed Bug YYYYYYY - bug description
	- other improvement

  }}} 

=== 3. Develop as you normally would ===
=== 4. Translation (Optional) ===
Following are recommend steps to use gettext to translate your project:

1. Create a sub directory 'po'
2. Edit 'po/CmakeLists.txt' 
{{{
    INCLUDE(ManageTranslation)
	INCLUDE(ManageZanata)

	SET(SOURCES_I18N ${CMAKE_SOURCE_DIR}/src/IBusChewingEngine.gob
		${CMAKE_SOURCE_DIR}/src/IBusChewingEngine-input-events.c
		${CMAKE_SOURCE_DIR}/src/IBusChewingEngine-def.c 
		${CMAKE_SOURCE_DIR}/src/main.c)

	MANAGE_GETTEXT(ALL SRCS ${SOURCES_I18N})

	MANAGE_ZANATA("https://translate.zanata.org/zanata/" 
		YES
		VERSION "master"
		GENERATE_ZANATA_XML
		)

	ADD_DEPENDENCIES(pack_src_pre translations)
  }}}
3. `make pot_files` to generate .pot files
4. (Optional) `make zanata_xml` for Zanata setting files.
5. (Optional) `make zanata_push` to push the documents to Zanata for translation.
6. Receive .po files from either translators. Or use `make zanata_pull` 
7. `make translations`

=== 5. Release the initial version ===
After commit the last change, just run `make release`

make release should:
1. Create a source archive
2. Create a source RPM and binary RPMs.
3. Run rpmlint and koji scratch build to ensure it build in Koji
4. Tag the source tree in given version
5. Do the fedpkg import, commit, push and build for the fedora release you want.
6. Do the bodhi update.

== Release a new version with cmake-fedora ==

When a release is ready, only need to update the RELEASE_NOTES.txt by fill in:
* The new version
    * Summary of this release
* Type of this release (default is bugfix)
    * What Bug this release actually fixed.
    * The detail list of changes under section [Changes]

    No need to edit CMakeLists.txt again.

    Start from Step 2 in previous section.

    == Useful targets ==
    pot_files::
    Generate pot files for translation.

    gmo_files::
    Generate gmo files for translation.

    pack_src::
    Create a source archive

    srpm::
    Create a source RPM

    rpm::
    Create a source RPM and binary rpms

    rpmlint::
    Run rpmlint for all RPM files

    install_rpms::
    Install all the binary rpms except the debuginfo

    koji_build_scratch::
    Run the koji scratch build for all targeted Fedora/EPEL release.

    upload::
    upload files to hosting services

    tag::
    Tag the current source tree with the version specified in RELEASE_NOTES.txt

    fedpkg_build::
    Run the fedpkg build for the specified Fedora/EPEL releases.

    release_fedora::
    Release for Fedora and/or EPEL

    release:
    Run the release process. release_fedora will be invoked if Fedora build support is enabled.

    clean_pkg::
    Remove all the source archive and RPM files.

    = Submit Bug Reports or Feature Requests =
    Please either submit 
    [https://bugzilla.redhat.com/enter_bug.cgi?format=guided&product=Fedora&component=cmake-fedora a new bug in Red Hat Bugzilla]

    or create [https://fedorahosted.org/cmake-fedora/newticket a new ticket in FedoraHosted]

    = TODO =
    * Project generate script
    * Import old spec
    * GUI

    * RPM
    * PRJ_RPM_FILES actually list all the binary RPM files.

    * Hosting support
    * `GitHub`

    * Support other distribution
    * Debian/Ubuntu