README.md 3.77 KB
Newer Older
Lafont François's avatar
Lafont François committed
1
# Install the environment to build the package
lafont's avatar
lafont committed
2

root's avatar
root committed
3
**Warning:** you can build the package only on **Debian Buster**.
Lafont François's avatar
Lafont François committed
4 5

These commands should be launched **only once**:
lafont's avatar
lafont committed
6

lafont's avatar
lafont committed
7 8
```sh
apt-get update
lafont's avatar
lafont committed
9
apt-get install -y git ca-certificates openssl make
10
git clone "https://git.backbone.education/lafont/xia-packaging"
lafont's avatar
lafont committed
11 12 13
cd xia-packaging/
./make install_env
```
lafont's avatar
lafont committed
14

Lafont François's avatar
Lafont François committed
15 16
In the following, it is assumed that these commands have
been already launched.
lafont's avatar
lafont committed
17 18


Lafont François's avatar
Lafont François committed
19
# Build the package with the current version mentioned in the `debian/changelog`
lafont's avatar
lafont committed
20

Lafont François's avatar
Lafont François committed
21
To build the package with the current version mentioned in
Lafont François's avatar
Lafont François committed
22
the `debian/changelog` file (ie in its first line), a tag
Lafont François's avatar
Lafont François committed
23 24 25
with the same version must exist in the "watch" page of the
upstream sources. In this case, you can build the package
with :
lafont's avatar
lafont committed
26

lafont's avatar
lafont committed
27
```sh
Lafont François's avatar
Lafont François committed
28
cd xia-packaging/
lafont's avatar
lafont committed
29

Lafont François's avatar
Lafont François committed
30 31 32
# For each build.
./make build
```
lafont's avatar
lafont committed
33

Lafont François's avatar
Lafont François committed
34
And the package (ie the `.deb` file) will be in the current
Lafont François's avatar
Lafont François committed
35
directory:
lafont's avatar
lafont committed
36 37

```sh
Lafont François's avatar
Lafont François committed
38
ls -lh
lafont's avatar
lafont committed
39 40 41
```


Lafont François's avatar
Lafont François committed
42
# Build the package with a version not yet mentioned in the `debian/changelog`
lafont's avatar
lafont committed
43

Lafont François's avatar
Lafont François committed
44 45
First, you have to create a new release entry in the
`debian/changelog` file :
46 47 48 49 50 51 52 53

```sh
# You must set several environment variables.
export EDITOR="vim" # take "nano" if you prefer.
export DEBEMAIL="pascal.fautrero@ac-versailles.fr"
export EMAIL="pascal.fautrero@ac-versailles.fr"
export DEBFULLNAME="Pascal Fautrero"

Lafont François's avatar
Lafont François committed
54
# Go to the `src/` directory in the git repository.
55 56 57 58 59 60 61 62 63 64
cd xia-packaging/src/

# Create a new entry in the `debian/changelog` file.
# In this example, `1.0~beta5` is the upstream version
# and `3` is the package revision for this upstream version.
# Of course each version number must increase over time.
# You MUST respect this syntax `<upstream version>-<package revision>`.
dch --newversion '1.0~beta5-3'
```

Lafont François's avatar
Lafont François committed
65 66
When your editor is opened, you can notice the `UNRELEASED`
string in the first line of the `debian/changelog` file.
67

Lafont François's avatar
Lafont François committed
68 69 70
After the command above, you can edit the file and append
explanations about this new release. When it's finished, you
must save and quit your editor. Then, run this command:
71 72 73 74 75

```sh
dch --release
```

Lafont François's avatar
Lafont François committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
Now, you can notice that the `UNRELEASED` string in the
first line is replaced by the `unstable` string. It's OK,
save and quit your editor. Now, the package source is ready
for a new release. You can commit and push.

After the commit and push, you can build the package:

```sh
cd ..
./make build
```


# Put the package in the "mentors" repository

To do that, you must be a maintainer of the package (ie you
must be present in the `Maintainer` field or in the
`Uploaders` field of the `src/debian/control` file) and you
must have a valid `~/.gnupg` directory on this current host.
95

96 97 98 99 100 101 102
Furthermore, you have to build the package via the command:

```sh
# You have to sign the package during the build with your PGP key.
cd xia-packaging/ && ./make build_sign
```

lafont's avatar
lafont committed
103 104 105 106
If you want to upload the package to `mentors.debian.net`,
you can launch these commands:

```sh
Lafont François's avatar
Lafont François committed
107 108
# You have to sign the package with your GPG key.
cd xia-packaging/ && ./make build_sign
lafont's avatar
lafont committed
109 110 111 112 113 114 115 116 117 118 119 120 121

cat > /tmp/.dput.cf <<EOF
[mentors]
fqdn = mentors.debian.net
incoming = /upload
method = http
allow_unsigned_uploads = 0
progress_indicator = 2
# Allow uploads for UNRELEASED packages
allowed_distributions = .*

EOF

122
dput -c /tmp/.dput.cf mentors xia_*_amd64.changes
lafont's avatar
lafont committed
123 124
```

125

Lafont François's avatar
Lafont François committed
126 127 128 129 130 131 132 133 134 135
# Install and test the package quickly

You can install and test the package quickly on Debian
Wheezy, Debian Jessie and Ubuntu Trusty Tahr. You just need
to launch these commands as *root*:

```sh
wget -q "http://repository.crdp.ac-versailles.fr/crdp.gpg" -O - | apt-key add -
echo "deb http://repository.crdp.ac-versailles.fr/debian xia main" | tee /etc/apt/sources.list.d/xia.list
apt-get update
Lafont François's avatar
Lafont François committed
136 137

# If you just want to install Xia but not Inkscape and its Xia plugin:
Lafont François's avatar
Lafont François committed
138
apt-get install xia
Lafont François's avatar
Lafont François committed
139 140 141

# Or if you want to install Xia with Inkscape and its Xia plugin:
apt-get install --install-suggests xia
Lafont François's avatar
Lafont François committed
142 143 144 145 146
```