From 7f5fcc617ca121876b1984da3989942807c3726f Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Sun, 4 Feb 2024 12:03:11 +0900 Subject: [PATCH] add doc/DEVELOP.md instead of doc/README.md --- doc/DEVELOP.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/README.md | 11 -------- 2 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 doc/DEVELOP.md delete mode 100644 doc/README.md diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md new file mode 100644 index 0000000..3b1e61c --- /dev/null +++ b/doc/DEVELOP.md @@ -0,0 +1,70 @@ + + +## Build mscp as deb package + +`make build-deb` produces a mscp deb package and related files. This +target builds mscp with `debuild` inside a docker container +(Dockerfile is `docker/build-deb.Docerfile`). + + +```console +mkdir build && cd build && cmake .. +make build-deb +``` + +After that: + +```console +$ ls debbuild +mscp_0.1.3_amd64.build mscp_0.1.3_amd64.deb mscp-dbgsym_0.1.3_amd64.ddeb +mscp_0.1.3_amd64.buildinfo mscp_0.1.3.dsc +mscp_0.1.3_amd64.changes mscp_0.1.3.tar.xz +``` + +### To publush mscp in launchpad PPA: + +1. write changes in `debian/changelog` at main branch (the date command needed here is `date -R`) +2. switch to `ppa-focal` or `ppa-jammy` branch +3. reblase to the `main` branch and modify `debian/changes`: + * change `UNRELEASED` to the release name (`focal` or `jammy`). +4. run `make build-deb` at the build directory and `cd debbuild` +5. sign the files with `debsign -k [GPGKEYID] mscp_X.X.X~X_source.changes` +5. upload the files with `dput ppa:upaa/mscp mscp_X.X.X~X_source.changes` + + +## Build mscp as (source) rpm package + +`make build-srpm` produces a mscp src.rpm package. This target builts +mscp with `rpmbuild` inside a docker container (Dockerfile is +`docker/build-srpm.Dockerfile`, generated from +`build-srpm.Dockerfile.in` by cmake). + +```console +mkdir build && cd build && cmake .. +make build-srpm +``` + +After that: + +```console +$ ls *.rpm +mscp-0.1.3-1.el9.src.rpm +``` + +### To publish mscp in COPR: + +1. download `mscp-X.X.X-1.yyy.src.rpm` +2. upload the src.rpm to Build page at COPR. + + + +## Update Document + +The docuemnt is `doc/mscp.rst` (at present). When `mscp.1.in` is +modified, run `make update-rst` to make it up to date. + +```console +mkdir build cd build && cmake .. +make update-rst +``` + diff --git a/doc/README.md b/doc/README.md deleted file mode 100644 index d4bf747..0000000 --- a/doc/README.md +++ /dev/null @@ -1,11 +0,0 @@ - -# Document - -The base file of documents is `mscp.1.in`. The manpage of mscp and -`doc/mscp.rst` are generated from `mscp.1.in`. - -When `mscp.1.in` is changed, update `doc/mscp.rst` by: - -1. `cd build` -2. `cmake ..` -3. `make update-mscp-rst` \ No newline at end of file