blob: 77beb43833a288de0aaca09860576df0682bc10d [file] [log] [blame]
Christian Eglif70f4e02011-01-03 15:09:06 +00001This HACKING file describes the development environment. -*- org -*-
Christian Egli5510e4a2009-11-05 09:55:30 +00002
Christian Egli311d52b2013-01-11 16:19:23 +00003 Copyright (C) 2008, 2009, 2011 ViewPlus Technologies, Inc. and Abilitiessoft, Inc.
Christian Egli818e58b2015-06-05 14:27:06 +02004 Copyright (C) 2012, 2013, 2014,2015 Swiss Library for the Blind, Visually Impaired and Print Disabled
Christian Egli311d52b2013-01-11 16:19:23 +00005
Christian Egli5510e4a2009-11-05 09:55:30 +00006 Copying and distribution of this file, with or without modification,
7 are permitted in any medium without royalty provided the copyright
Christian Egli741b0072014-09-18 11:08:45 +02008 notice and this notice are preserved. This file is offered as-is,
9 without any warranty.
Christian Eglieddc4662009-03-09 13:27:20 +000010
11This file attempts to describe the maintainer-specific notes to follow
12when hacking liblouis.
13
Christian Eglif9496272017-04-18 17:00:39 +020014* Table of Contents :TOC:
15 - [[#developing][Developing]]
16 - [[#where-to-get-it][Where to get it]]
17 - [[#build-requirements][Build requirements]]
18 - [[#gnulib][Gnulib]]
19 - [[#how-to-build][How to build]]
20 - [[#install-with-homebrew][Install with Homebrew]]
21 - [[#docker][Docker]]
22 - [[#how-to-run-tests][How to run tests]]
23 - [[#how-to-debug][How to debug]]
24 - [[#how-to-find-memory-leaks][How to find memory leaks]]
25 - [[#how-to-analyze-performance][How to analyze performance]]
26 - [[#how-to-build-for-windows][How to build for Windows]]
27 - [[#release-procedure][Release Procedure]]
28 - [[#update-the-news-entry][Update the NEWS entry]]
29 - [[#set-the-version-number][Set the version number]]
30 - [[#commit-and-tag][Commit and tag]]
31 - [[#make-the-release][Make the release]]
32 - [[#upload][Upload]]
33 - [[#online-documentation][Online documentation]]
34 - [[#web-site-maintenance][Web site maintenance]]
35 - [[#announce][Announce]]
36
Christian Egli5510e4a2009-11-05 09:55:30 +000037* Developing
38** Where to get it
Christian Egli71647d62014-05-20 09:20:28 +020039The development sources are available through git at github.com:
Christian Egli5510e4a2009-11-05 09:55:30 +000040
Christian Egli71647d62014-05-20 09:20:28 +020041 https://github.com/liblouis/liblouis
Christian Egli5510e4a2009-11-05 09:55:30 +000042
43** Build requirements
Christian Egli818e58b2015-06-05 14:27:06 +020044To build Automake, Autoconf, and Libtool are used. If you are getting
45the sources from git (or change configure.ac), you'll need to have
46these tools installed to (re)build. Optionally (if you want to
Christian Egli63ab27f2017-04-21 10:57:13 +020047generate man pages) you'll also need ~help2man~. All of these programs
Christian Egli5510e4a2009-11-05 09:55:30 +000048are available from ftp://ftp.gnu.org/gnu.
49
Christian Eglia02c1362017-03-06 10:38:45 +010050If you want to run the YAML based test suite you will have to install
51~libyaml~.
52
Bert Frees34df6a62015-04-10 16:10:21 +020053On Mac OS, the programs can be optained with Homebrew (http://brew.sh):
Bert Freesd41c9ac2015-03-25 14:42:43 +010054
Christian Egli63ab27f2017-04-21 10:57:13 +020055#+BEGIN_SRC shell
56$ brew install automake libtool pkg-config texinfo
57#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +020058
59Note that if you are using Homebrew to install liblouis (see below),
60the build dependencies are installed automatically.
Bert Freesd41c9ac2015-03-25 14:42:43 +010061
Christian Egli5510e4a2009-11-05 09:55:30 +000062** Gnulib
Christian Egli818e58b2015-06-05 14:27:06 +020063Gnulib (http://www.gnu.org/software/gnulib) is used to provide
64portable basic functionality to programs and libraries. We use two
65instances of gnulib, one to provide portable functions such as
66~malloc~, ~strndup~, etc to the library and another one to provide
67portable functionality such as ~getopt~, ~progname~ or
68~version-etc~ to the tools.
Christian Egli5510e4a2009-11-05 09:55:30 +000069
Christian Egli818e58b2015-06-05 14:27:06 +020070The first time invocation to import gnulib for the library was
71
Christian Egli63ab27f2017-04-21 10:57:13 +020072#+BEGIN_SRC shell
73$ gnulib-tool --add-import --lib=libgnu --source-base=gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020074 --m4-base=gnulib/m4 --aux-dir=build-aux --libtool \
75 --macro-prefix=gl --no-vc-files \
76 malloc-gnu realloc-gnu strndup
Christian Egli63ab27f2017-04-21 10:57:13 +020077#+END_SRC
Christian Egli818e58b2015-06-05 14:27:06 +020078
79and for the tools
80
Christian Egli63ab27f2017-04-21 10:57:13 +020081#+BEGIN_SRC shell
82$ gnulib-tool --add-import --lib=libgnutools --source-base=tools/gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020083 --m4-base=tools/gnulib/m4 --aux-dir=build-aux --libtool \
84 --macro-prefix=gl_tools --no-vc-files \
85 getopt-gnu malloc-gnu progname version-etc
Christian Egli63ab27f2017-04-21 10:57:13 +020086#+END_SRC
Christian Egli818e58b2015-06-05 14:27:06 +020087
Christian Egli5510e4a2009-11-05 09:55:30 +000088More modules might have been added since. The currently-used gnulib
89modules and other gnulib information are recorded in
Christian Egli818e58b2015-06-05 14:27:06 +020090~gnulib/m4/gnulib-cache.m4~ and ~tools/gnulib/m4/gnulib-cache.m4~.
91
92If you want to update from the current gnulib, install gnulib, and
93then run the following commands in the top-level directory.
94
Christian Egli63ab27f2017-04-21 10:57:13 +020095#+BEGIN_SRC shell
96$ gnulib-tool --add-import --lib=libgnu --source-base=gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020097 --m4-base=gnulib/m4 --aux-dir=build-aux --libtool \
98 --macro-prefix=gl --no-vc-files
Christian Egli63ab27f2017-04-21 10:57:13 +020099$ gnulib-tool --add-import --lib=libgnutools --source-base=tools/gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +0200100 --m4-base=tools/gnulib/m4 --aux-dir=build-aux --libtool \
101 --macro-prefix=gl_tools --no-vc-files
Christian Egli63ab27f2017-04-21 10:57:13 +0200102#+END_SRC
Christian Egli5510e4a2009-11-05 09:55:30 +0000103
104** How to build
Christian Egli71647d62014-05-20 09:20:28 +0200105After getting the sources from git, with
Christian Egli81b04812009-11-05 11:07:17 +0000106
Christian Egli63ab27f2017-04-21 10:57:13 +0200107#+BEGIN_SRC shell
108$ git clone https://github.com/liblouis/liblouis.git
109#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000110
111and installing the tools above, change to the liblouis directory and
112and bootstrap the project with the following command
113
Christian Egli63ab27f2017-04-21 10:57:13 +0200114#+BEGIN_SRC shell
115$ ./autogen.sh
116#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000117
118to do a fresh build. Then run configure as usual:
119
Christian Egli63ab27f2017-04-21 10:57:13 +0200120#+BEGIN_SRC shell
121$ ./configure
122#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000123
124You have the choice to compile liblouis for either 16- or 32-bit
125Unicode. By default it is compiled for the former. To get 32-bit
Christian Egli63ab27f2017-04-21 10:57:13 +0200126Unicode run configure with ~--enable-ucs4~.
Christian Egli81b04812009-11-05 11:07:17 +0000127
Christian Egli63ab27f2017-04-21 10:57:13 +0200128After running configure run ~make~ and then ~make install~. You must
Christian Egli81b04812009-11-05 11:07:17 +0000129have root privileges for the installation step.
Christian Egli5510e4a2009-11-05 09:55:30 +0000130
Bert Frees34df6a62015-04-10 16:10:21 +0200131** Install with Homebrew
132Homebrew (http://brew.sh) is a package manager for Mac OS X that
133installs software from source. There is nothing special about the
134installation process in the sense that under the hood it happens
135exactly as described above, with the only difference that Homebrew
136automates it completely.
137
138First, use the ~brew tap~ command to add the repository that includes
139the liblouis formula:
140
Christian Egli63ab27f2017-04-21 10:57:13 +0200141#+BEGIN_SRC shell
142$ brew tap liblouis/liblouis
143#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200144
145Now you are ready to install liblouis:
146
Christian Egli63ab27f2017-04-21 10:57:13 +0200147#+BEGIN_SRC shell
148$ brew install liblouis
149#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200150
Bert Freesd41c9ac2015-03-25 14:42:43 +0100151** Docker
Bert Frees34df6a62015-04-10 16:10:21 +0200152Docker (https://www.docker.com) can be useful both for creating a
153development environment for liblouis, and for shipping the
154application.
Bert Freesd41c9ac2015-03-25 14:42:43 +0100155
Bert Frees34df6a62015-04-10 16:10:21 +0200156Setting up a developer environment can take long and can be
157problematic especially for Windows. Thanks to Docker we can set up the
158environment for you, we can easily distribute it as an image, which
159can be run by anybody and will behave exactly the same for everybody.
Bert Freesd41c9ac2015-03-25 14:42:43 +0100160
Bert Frees34df6a62015-04-10 16:10:21 +0200161Docker images of liblouis are being built automatically each time
162something changes in the code (see https://registry.hub.docker.com/repos/liblouis).
163In order to use them, first get Docker at
164http://docs.docker.com/introduction/get-docker. Download the latest
165liblouis image with:
Bert Freesd41c9ac2015-03-25 14:42:43 +0100166
Christian Egli63ab27f2017-04-21 10:57:13 +0200167#+BEGIN_SRC shell
168$ docker pull liblouis/liblouis
169#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200170
171Then, enter the development environment by running the image in a
172Docker container:
173
Christian Egli63ab27f2017-04-21 10:57:13 +0200174#+BEGIN_SRC shell
175$ docker run -it liblouis/liblouis bash
176#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200177
178Local files and directories can be "mounted" inside the container, in
179order to make it easier to edit files and to persist changes across
180runs. For example, to use local table files:
181
Christian Egli63ab27f2017-04-21 10:57:13 +0200182#+BEGIN_SRC shell
183$ docker run -it -v $(pwd)/tables:/tmp/liblouis/tables liblouis/liblouis bash
184#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200185
186See the Docker documentation for more info.
187
188The same Docker image can be used as a development environment and as
189the application itself. For example, to run the lou_translate tool
190from inside a Docker container:
191
Christian Egli63ab27f2017-04-21 10:57:13 +0200192#+BEGIN_SRC shell
193$ docker run -it liblouis/liblouis lou_translate en-us-g1.ctb
194#+END_SRC
Bert Freesd41c9ac2015-03-25 14:42:43 +0100195
Bert Frees34df6a62015-04-10 16:10:21 +0200196To rebuild the image yourself, run the following command in the root
197directory of the liblouis source:
Bert Freesd41c9ac2015-03-25 14:42:43 +0100198
Christian Egli63ab27f2017-04-21 10:57:13 +0200199#+BEGIN_SRC shell
200$ docker build -t liblouis/liblouis .
201#+END_SRC
Bert Freesd41c9ac2015-03-25 14:42:43 +0100202
Christian Egli63ab27f2017-04-21 10:57:13 +0200203A ~.dockerignore~ file is required if you want to compile the source
204both on te host and in the Docker container. The ~.dockerignore~ file
205can be updated from ~.gitignore~ with:
Bert Frees12e99042015-11-15 12:23:40 +0100206
Christian Egli63ab27f2017-04-21 10:57:13 +0200207#+BEGIN_SRC shell
208$ make .dockerignore
209#+END_SRC
Bert Frees12e99042015-11-15 12:23:40 +0100210
Bert Freesd41c9ac2015-03-25 14:42:43 +0100211** How to run tests
Bert Frees34df6a62015-04-10 16:10:21 +0200212Tests are run with
Bert Freesd41c9ac2015-03-25 14:42:43 +0100213
Christian Egli63ab27f2017-04-21 10:57:13 +0200214#+BEGIN_SRC shell
215$ make check
216#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200217
Christian Eglif70f4e02011-01-03 15:09:06 +0000218** How to debug
Christian Egli45b3d322013-01-17 09:51:56 +0000219First you have to build liblouis with debugging info enabled.
220
Christian Egli63ab27f2017-04-21 10:57:13 +0200221#+BEGIN_SRC shell
222$ ./configure CFLAGS='-g -O0 -Wall -Wextra'
223$ make
224#+END_SRC
Christian Egli45b3d322013-01-17 09:51:56 +0000225
Christian Eglif70f4e02011-01-03 15:09:06 +0000226Starting the programs under the tools directory within gdb is a little
227tricky as they are linked with libtool. See the info page of libtool
Christian Egli63ab27f2017-04-21 10:57:13 +0200228for more information. To start ~lou_checktable~ for table
229~wiskunde.ctb~ for example you'd have to issue the following commands:
Christian Eglif70f4e02011-01-03 15:09:06 +0000230
Christian Egli63ab27f2017-04-21 10:57:13 +0200231#+BEGIN_SRC shell
232$ libtool --mode=execute gdb ./tools/lou_checktable
233(gdb) run tables/wiskunde.ctb
234#+END_SRC
Christian Eglif70f4e02011-01-03 15:09:06 +0000235
Christian Eglic77a5892012-05-11 12:11:26 +0000236** How to find memory leaks
237Valgrind is a tool that can be used to find memory errors. It is
238recommended that you compile liblouis without any optimizations and
239with all warnings enabled before running it through Valgrind:
240
Christian Egli63ab27f2017-04-21 10:57:13 +0200241#+BEGIN_SRC shell
242$ ./configure CFLAGS='-g -O0 -Wall'
243$ make
244#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000245
246Then use Valgrind to analyze liblouis. For example you can run
Christian Egli63ab27f2017-04-21 10:57:13 +0200247~lou_translate~ trough Valgrind:
Christian Eglic77a5892012-05-11 12:11:26 +0000248
Christian Egli63ab27f2017-04-21 10:57:13 +0200249#+BEGIN_SRC shell
250$ libtool --mode=execute valgrind -v --tool=memcheck \
251 --leak-check=full --leak-resolution=high --log-file=valgrind.log \
252 ./tools/lou_translate en-us-g2.ctb
253#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000254
255Type a few words at the prompt, check translation and terminate
Christian Egli63ab27f2017-04-21 10:57:13 +0200256~lou_translate~. Now open the file ~valgrind.log~ and see if there are
257any memory leaks reported.
Christian Eglic77a5892012-05-11 12:11:26 +0000258
259You can also just run lou_checktable for example:
260
Christian Egli63ab27f2017-04-21 10:57:13 +0200261#+BEGIN_SRC shell
262$ libtool --mode=execute valgrind -v --tool=memcheck \
263 --leak-check=full --leak-resolution=high --log-file=valgrind.log \
264 ./tools/lou_checktable tables/nl-BE-g0.utb
265#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000266
267Again open valgrind.log to see if any memory leaks were reported.
268
Christian Egliae435322012-05-14 10:00:36 +0000269For the full experience run lou_allround under Valgrind:
270
Christian Egli63ab27f2017-04-21 10:57:13 +0200271#+BEGIN_SRC shell
272$ libtool --mode=execute valgrind -v --tool=memcheck \
273 --leak-check=full --show-reachable=yes \
274 --leak-resolution=high --track-origins=yes \
275 --log-file=valgrind.log ./tools/lou_allround
276#+END_SRC
Christian Egliae435322012-05-14 10:00:36 +0000277
Christian Egli777a8172017-05-10 14:10:12 +0200278*** AddressSanitizer
279[[https://github.com/google/sanitizers/wiki/AddressSanitizer][AdressSanitizer]] is a memory error detector for C/C++. It is part of
280both LLVM and gcc. To check liblouis build it as follows:
281
282#+BEGIN_SRC shell
283$ ./autogen.sh
284$ ./configure CFLAGS='-fsanitize=address -O1 -fno-omit-frame-pointer -g'
285$ make
286$ ./tools/lou_translate tables/en-ueb-g2.ctb
287#+END_SRC
288
289Run a few translations, end the program and marvel at the output
290AddressSanitizer. At the time of this writing it complained pretty
291hard:
292
293#+BEGIN_EXAMPLE
294SUMMARY: AddressSanitizer: 12384 byte(s) leaked in 12 allocation(s).
295#+END_EXAMPLE
296
Christian Egli29de9382017-04-21 10:38:56 +0200297*** Electric Fence
298Electric Fence is a tool that helps detect memory access that overruns
Christian Egli63ab27f2017-04-21 10:57:13 +0200299the boundaries of a ~malloc()~ memory allocation, and access to memory
300that has been released with ~free()~.
Christian Egli29de9382017-04-21 10:38:56 +0200301
302Under Debian the usage is fairly straightforward:
303
304#+BEGIN_SRC shell
305$ sudo apt install sudo apt install electric-fence
306#+END_SRC
307
Christian Egli3b900dc2017-04-21 11:11:55 +0200308Then compile [[#how-to-debug][as above]] and invoke the debugger [[#how-to-debug][as above]]. Inside ~gdb~
Christian Egli63ab27f2017-04-21 10:57:13 +0200309set up ~LOUIS_TABLEPATH~ and ~LD_PRELOAD~ as follows:
Christian Egli29de9382017-04-21 10:38:56 +0200310
Christian Egli63ab27f2017-04-21 10:57:13 +0200311#+BEGIN_SRC shell
312$ libtool --mode=execute gdb ./tools/lou_allround
313(gdb) set environment LOUIS_TABLEPATH ./tables,./tests/tables,./tests/tables/moreTables,./tests/tablesWithMetadata,./tests/tables/emphclass
314(gdb) set environment LD_PRELOAD /usr/lib/libefence.so.0.0
315(gdb) run
Christian Egli29de9382017-04-21 10:38:56 +0200316#+END_SRC
317
318If there are problems with memory access the program will run into a
319segmentation fault which you can consequently analyze in the debugger.
320
Christian Egli6eb63342013-06-03 10:03:54 +0000321** How to analyze performance
322Gprof helps you analyze the performance of programs. You have to
323compile liblouis as follows:
324
Christian Egli63ab27f2017-04-21 10:57:13 +0200325#+BEGIN_SRC shell
326$ ./configure --disable-shared
327$ make clean all CFLAGS='-g -O0 -pg' LDFLAGS='-all-static'
328#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000329
330Then translate some stuff with a large table:
331
Christian Egli63ab27f2017-04-21 10:57:13 +0200332#+BEGIN_SRC shell
333$ ./tools/lou_translate tests/tables/large.ctb
334#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000335
336Finally look at the call profile:
337
Christian Egli63ab27f2017-04-21 10:57:13 +0200338#+BEGIN_SRC shell
339$ libtool --mode=execute gprof ./tools/lou_translate gmon.out
340#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000341
Bert Freesd51268a2015-11-15 17:23:45 +0100342** How to build for Windows
Christian Egli63ab27f2017-04-21 10:57:13 +0200343See the ~README.windows~ file and the windows subdirectory.
Christian Egli75cd5692012-05-16 08:00:37 +0000344
Bert Frees34df6a62015-04-10 16:10:21 +0200345*** How to cross-compile for Windows
346To compile for win32, use the MinGW win32 cross-compiler as shown
347below. Use the prefix option to install the binaries to a temporary
Christian Egli63ab27f2017-04-21 10:57:13 +0200348place where you can create a zip file. The ~LDFLAGS='-all-static'~
Christian Egli854386d2016-06-01 16:47:42 +0200349ensures that libgcc is linked in statically. Otherwise the users need
Christian Egli63ab27f2017-04-21 10:57:13 +0200350to have ~libgcc_s_sjlj-1.dll~.
Christian Egli75cd5692012-05-16 08:00:37 +0000351
Christian Eglid5bea6c2016-06-03 08:38:52 +0200352Some users want the dlls unversioned. To achieve that add
Christian Egli63ab27f2017-04-21 10:57:13 +0200353~-avoid-version~ to ~LDFLAGS~.
Christian Eglid5bea6c2016-06-03 08:38:52 +0200354
Christian Egli63ab27f2017-04-21 10:57:13 +0200355#+BEGIN_SRC shell
356$ ./configure --build=i686-pc-linux-gnu --host=i686-w64-mingw32 --prefix=/tmp/liblouis-mingw32
357$ make LDFLAGS='-avoid-version -Xcompiler -static-libgcc'
358$ make install
359$ zip -r liblouis-mingw32msvc.zip /tmp/liblouis-mingw32
360#+END_SRC
Christian Egli75cd5692012-05-16 08:00:37 +0000361
Bert Frees34df6a62015-04-10 16:10:21 +0200362To compile for win64, use the MinGW-w64 cross-compiler:
363
Christian Egli63ab27f2017-04-21 10:57:13 +0200364#+BEGIN_SRC shell
365$ ./configure --build=i686-pc-linux-gnu --host=x86_64-w64-mingw32 --prefix=/tmp/liblouis-w64-mingw32
366$ make LDFLAGS='-avoid-version -Xcompiler -static-libgcc'
367$ make install
368$ zip -r liblouis-w64-mingw32.zip /tmp/liblouis-w64-mingw32
369#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200370
Bert Freesd51268a2015-11-15 17:23:45 +0100371Two makefile rules have been provided to do this automatically for you. Docker will be used if the
Christian Egli63ab27f2017-04-21 10:57:13 +0200372right cross-compiler is not installed. To compile for win32 using the MinGW cross-compiler, run ~make
373distwin32~. This will produce a ZIP file called ~liblouis-<version>-win32.zip~. To compile for win64
374using the MinGW-w64 cross-compiler, run ~make distwin64~. This will produce a ZIP file called
375~liblouis-<version>-win64.zip~.
Bert Freesd51268a2015-11-15 17:23:45 +0100376
Bert Frees34df6a62015-04-10 16:10:21 +0200377*** TODO How to build for Windows using Cygwin
378(possibly use a Vagrantfile as demonstration + explain that Cygwin
379binaries can not be used outside the Cygwin environment)
380
381*** TODO How to build for Windows using MinGW
382(possibly use a Vagrant file as demonstration)
383
Christian Eglieddc4662009-03-09 13:27:20 +0000384* Release Procedure
385These steps describe what a maintainer does to make a release; they
386are not needed for ordinary patch submission.
387
Christian Egli2d889a82015-12-07 08:56:55 +0100388** Update the NEWS entry
389If any new tables were added or renamed please note them with their
390name in the NEWS entry. This is usefull for projects like NVDA.
391
Christian Eglieddc4662009-03-09 13:27:20 +0000392** Set the version number
Christian Egli63ab27f2017-04-21 10:57:13 +0200393Update the version number in ~NEWS~ (with version, date, and release
394type), ~ChangeLog~, ~configure.ac~ and ~windows/include/config.h~.
Christian Eglieddc4662009-03-09 13:27:20 +0000395
Christian Egli63ab27f2017-04-21 10:57:13 +0200396Don't forget to update the libtool versioning info in ~configure.ac~,
397i.e. ~LIBLOUIS_REVISION~ and possibly ~LIBLOUIS_CURRENT~ and ~LIBLOUIS_AGE~.
Christian Eglid1f57182011-05-18 07:16:46 +0000398
Christian Eglieddc4662009-03-09 13:27:20 +0000399** Commit and tag
400Commit the changes and tag this version
401
Christian Egli63ab27f2017-04-21 10:57:13 +0200402#+BEGIN_SRC shell
403$ git tag -s v2.6.0 -m "Release 2.6.0"
404$ git push origin v2.6.0
405#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000406
407If you know the exact version number that needs to be tagged use
408
Christian Egli63ab27f2017-04-21 10:57:13 +0200409#+BEGIN_SRC shell
410$ git tag -s v2.6.0 -m "Release 2.6.0" <commit>
411$ git push origin v2.6.0
412#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000413
414** Make the release
415Check out a clean copy in a different directory, like /tmp. Run
416autogen.sh and configure with no special prefixes. Run make distcheck.
417This will make sure that all needed files are present, and do a
418general sanity check. Run make dist. This will produce a tarball.
419
Christian Egli63ab27f2017-04-21 10:57:13 +0200420#+BEGIN_SRC shell
421$ ./autogen.sh && ./configure && make && make distcheck && make dist
422#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000423
424** Upload
Christian Egli88bfad92015-06-01 11:16:46 +0200425Add the tarball to the github liblouis releases page, i.e. add it
426under https://github.com/liblouis/liblouis/releases with the specific
427release and add a link to it in $WEBSITE/downloads/index.md. See below
428for instructions on how to update the web site.
Christian Eglieddc4662009-03-09 13:27:20 +0000429
Christian Egli2ed702e2009-03-12 13:06:39 +0000430** Online documentation
Christian Egli71647d62014-05-20 09:20:28 +0200431The online documentation is part of the liblouis web site. To add it to the
432site simply copy doc/liblouis.html to $WEBSITE/documentation/liblouis.html.
433Make sure you add the proper YAML front matter. Again see below for
434instructions on how to update the web site.
Christian Egli2ed702e2009-03-12 13:06:39 +0000435
Christian Egli71647d62014-05-20 09:20:28 +0200436** Web site maintenance
437The liblouis web site at liblouis.org is maintained with the help of
Christian Egli63ab27f2017-04-21 10:57:13 +0200438[[https://pages.github.com/][github pages]]. To edit the site just check out the repo at
439https://github.com/liblouis/liblouis.github.io. You'll need to know a
440few things about [[http://jekyllrb.com/][Jekyll]] and markdown, the markup that is used to edit
441the content. In order to update the site simply edit, commit and push.
Christian Egli2ed702e2009-03-12 13:06:39 +0000442
Christian Egli00087342017-03-07 16:13:16 +0100443For the new release update the project web site.
444
445- Add a post containing the current NEWS to the _posts directory and
446- add the download artifacts to the download page
Christian Egli2ed702e2009-03-12 13:06:39 +0000447
Christian Egli25419732011-05-09 07:38:14 +0000448** Announce
449Send an announcement to the liblouis list
Christian Egli63ab27f2017-04-21 10:57:13 +0200450~liblouis-liblouisxml@freelists.org~. See ~ANNOUNCEMENT~ for an
451example.
Christian Egli25419732011-05-09 07:38:14 +0000452