Skip to content

Commit

Permalink
standardized the (de)installation procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
fbb-git committed Oct 4, 2015
1 parent f1d4442 commit 22cf304
Show file tree
Hide file tree
Showing 26 changed files with 391 additions and 398 deletions.
2 changes: 1 addition & 1 deletion excluded
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
frame
*/frame
frank
inmail
inmail.big
Expand Down
105 changes: 62 additions & 43 deletions gpg-remailer/INSTALL
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To install the gpg-remailer by hand instead of using a binary distribution
perform the following steps:
To install gpg-remailer by hand instead of using a binary distribution perform
the following steps:

0. Gpg-remailer and its construction depends, in addition to the normally
0. gpg-remailer and its construction depends, in addition to the normally
standard available system software on specific software and versions
which is documented in the file `required'.

Expand All @@ -18,7 +18,7 @@ perform the following steps:
reducing the output generated by 'build'.

2. Inspect the values of the variables in the file INSTALL.im Modify these
when necessary.
when necessary.

3. Run
./build program [strip]
Expand All @@ -27,46 +27,65 @@ perform the following steps:

4. If you installed Yodl then you can create the documentation:
./build man
to build the man-page.

5. Before installing components of the gpg-remailer, consider defining
the environment variable REMAILER, defining its value as the
(preferably absolute) filename of a file on which installed files and
directories are logged. Defining the REMAILER environment variable as
~/.remailer usually works well.

6. Installation of the software in the default locations (i.e,, without
specifying a 'base' location, see the command below) probably requires
root permissions.

To install the software run:

./build install [base]

This installs the gpg-remailer, its man page and standard
documentation below 'base' in the locations defined in INSTALL.im. If
you don't want to install a particular component remove the
corresponding #define from INSTALL.im. By default 'base' is an empty
string.

7. Following the installation nothing in the directory tree which contains
builds the man-pages, and
./build manual
builds the manual.

5. Before installing the components of gpg-remailer, consider defining the
environment variable GPGREMAILER, defining its value as the (preferably
absolute) filename of a file on which installed files and directories
are logged.
Defining the GPGREMAILER environment variable as ~/.gpg-remailer usually
works well.

6. Run (probably as root)

./build install 'what' 'base'

to install. Here, 'what' specifies what you want to install.
Specify:
x, to install all components,
or specify a combination of:
b (binary program),
d (standard documentation),
m (man-pages)

E.g., use
./build install bm 'base'
if you only want to be able to run gpg-remailer, and want its man-page
to be installed below 'base'.

./build install's last argument 'base' is optional: the base directory
below which the requested files are installed. This base directory is
prepended to the paths #defined in the INSTALL.im file. If 'base' is
not specified, then INSTALL.im's #defined paths are used as-is.

When requesting non-existing elements (e.g., './build install x' was
requested, but the man-pages weren't constructed) then these
non-existing elements are silently ignored by the installation
process.

If the environment variable GPGREMAILER was defined when issuing the
`./build install ...' command then a log of all installed files is
written to the file indicated by the GPGREMAILER environment variable
(see also the next item).

Defining the GPGREMAILER environment variable as ~/.gpg-remailer
usually works well.

7. Uninstalling previously installed components of gpg-remailer is easy
if the environment variable GPGREMAILER was defined before issuing the
`./build install ...' command. In that case, run the command

./build uninstall logfile

where 'logfile' is the file that was written by ./build install.
Modified files and non-empty directories are not removed, but the
logfile itself is removed following the uninstallation.

8. Following the installation nothing in the directory tree which contains
this file (i.e., INSTALL) is required for the proper functioning of
the gpg-remailer, so consider removing it. If you only want to remove
gpg-remailer, so consider removing it. If you only want to remove
left-over files from the build-process, just run

./build distclean

8. Uninstalling previously installed components of the gpg-remailer
(using ./build install ...) is easy if the environment variable
REMAILER was defined when issuing the `./build install ...'
command. In that case, run the command

./build uninstall

This command only works if the environment variable REMAILER has the
same value as was used with the `./build install' commands, and the
file to which it refers still exists. In that case `./build uninstall'
removes all installed files (unless they were modified) and removes
all empty directories created by the `./build install ...' command.
Defining the REMAILER environment variable as ~/.rmailer usually works
well.
31 changes: 20 additions & 11 deletions gpg-remailer/INSTALL.im
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,31 @@
// -d same as --no-dereference --preserve=links
#define CPOPTS "-d"

// =========================================================================
// Deactivate (e.g., use //#define ...) the following #defines to prevent
// installation of the indicated component by 'build install'
// 'build install base' can be used to specify a base directory below which
// all components are installed (e.g., gpg-remailer is then installed in
// 'base + BINARY')
// =========================================================================
// COMPONENTS TO INSTALL
// =====================

// the directory where gpg-remailer is installed
#define BINARY "/usr/bin"
// For an operational non-Debian installation, you probably must be
// `root'.

// If necessary, adapt DOC, HDR, LIB and MAN (below) to your situation.
// The provided locations are used by Debian Linux.

// With 'build install' you can dynamically specify a location to prepend
// to the locations configured here, and select which components you want
// to install

// ONLY USE ABSOLUTE DIRECTORY NAMES:


// the final program
#define BINARY "/usr/bin/"${PROGRAM}

// the directory where the standard documentation is stored
#define DOC "/usr/share/doc/"${PROGRAM}

// the directory whre the manual page is stored
#define MAN "/usr/share/man/man1"

// the directory where the standard documentation is stored
#define STD "/usr/share/doc/"${PROGRAM}



2 changes: 1 addition & 1 deletion gpg-remailer/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define VERSION "3.01.00"
#define VERSION "3.01.01"
#define YEARS "2006-2015"
49 changes: 19 additions & 30 deletions gpg-remailer/build
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
#!/usr/bin/icmake -qt/tmp/gpg-remailer

#define LOGENV "REMAILER"
#define LOGENV "GPGREMAILER"

#include "icmconf"

list g_log;
string
g_logPath = getenv(LOGENV)[1],
g_logMark, // unique-marker for g_log entries
g_cwd = chdir(""); // initial working directory, ends in /

int g_echo = ON; // MODIFIED, existing variable

int g_installing; // set to 1 by install.
int g_lognr; // unique-marker number counter for g_log entries


#include "icmake/cuteoln"
#include "icmake/backtick"
#include "icmake/mark"

#include "icmake/setopt"
#include "icmake/run"
#include "icmake/md"
#include "icmake/md5sum"

#include "icmake/log"

#include "icmake/findall"
#include "icmake/loginstall"
#include "icmake/logzip"
#include "icmake/logfile"

#include "icmake/writelog"

#include "icmake/readlog"
#include "icmake/findall"
#include "icmake/remove"
#include "icmake/removedir"
#include "icmake/uninstall"

#include "icmake/loglink"
#include "icmake/loginstall"
#include "icmake/pathfile"
#include "icmake/precompileheaders" // check the name of main.ih

#include "icmake/special"
#include "icmake/precompileheaders"

#include "icmake/clean"
#include "icmake/manpage"
#include "icmake/install"
Expand Down Expand Up @@ -71,7 +53,7 @@ void main(int argc, list argv)
clean(1);

if (option == "install")
install(argv[2]);
install(argv[2], argv[3]);

if (option != "")
special();
Expand All @@ -80,7 +62,7 @@ void main(int argc, list argv)
github();

if (option == "uninstall")
uninstall();
uninstall(argv[2]);

if (option == "man")
manpage();
Expand All @@ -104,6 +86,7 @@ void main(int argc, list argv)

if (option == "oxref")
{
precompileHeaders();
system("icmbuild program " + strip);
run("oxref -fxs tmp/lib" LIBRARY ".a > " PROGRAM ".xref");
exit(0);
Expand All @@ -121,12 +104,18 @@ void main(int argc, list argv)
" program [strip] - build " PROGRAM " (optionally strip the\n"
" executable)\n"
" oxref [strip] - same a `program', also builds xref file\n"
" install selection [base] - to install the software in the \n"
" locations defined in the INSTALL.im file,\n"
" optionally below base\n"
" selection can be\n"
" x, to install all components,\n"
" or a combination of:\n"
" b (binary program),\n"
" d (documentation),\n"
" m (man-pages)\n"
" uninstall logfile - remove files and empty directories listed\n"
" in the file 'logfile'\n"
" using oxref\n"
" install [base] - install the software in the locations\n"
" defined in the INSTALL.im file,\n"
" optionally below 'base]'\n"
" uninstall - remove installed files and empty "
"directories\n"
" github - prepare github's gh-pages update\n"
" (internal use only)\n"
"\n"
Expand Down
8 changes: 8 additions & 0 deletions gpg-remailer/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
gpg-remailer (3.01.01)

* Standardized the (de)installation procedures

* Gpg-remailer depends on Bobcat >= 4.01.02

-- Frank B. Brokken <f.b.brokken@rug.nl> Sun, 04 Oct 2015 11:28:28 +0200

gpg-remailer (3.01.00)

* After Bobcat 3.19.00 Bobcat's class Process can again be used. This
Expand Down
Loading

0 comments on commit 22cf304

Please sign in to comment.