1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 12:23:54 +01:00

Merge pull request #84 from TREX-CoE/debian-packaging

Debian packaging
This commit is contained in:
Anthony Scemama 2022-02-17 15:51:51 +01:00 committed by GitHub
commit 707a07b04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 472 additions and 0 deletions

3
.gitignore vendored
View File

@ -41,3 +41,6 @@ trex.json
*~
.*.swp
/build*
# output of debian build (debuild)
libtrexio-*
libtrexio_*

View File

@ -37,6 +37,7 @@ CLEANFILES = trexio.mod
BUILT_SOURCES = trexio.mod
EXTRA_DIST = .git_hash
PACKAGE_VERSION = @PACKAGE_VERSION@
SUBDIRS =
pkgconfigdir = $(libdir)/pkgconfig
@ -83,6 +84,26 @@ EXTRA_DIST += CMakeLists.txt \
cmake/cmake_uninstall.cmake.in \
cmake/FindTREXIO.cmake
# Include files needed to produce the debian package.
DEB_FILES = \
debian/changelog \
debian/compat \
debian/control \
debian/copyright \
debian/patches \
debian/README.Debian \
debian/README.md \
debian/rules \
debian/source \
debian/watch
EXTRA_DIST += $(DEB_FILES)
debian_from_dist: $(DEB_FILES) $(SOURCES) $(trexio_h)
cp ../trexio-$(PACKAGE_VERSION).tar.gz ../libtrexio_$(PACKAGE_VERSION).orig.tar.gz
debuild
# =============== TESTS =============== #
TESTS_C = \

7
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,7 @@
libtrexio for Debian
libtrexio is an I/O library for quantum chemistry.
(Automatically generated by debmake Version 4.3.1)
-- Evgeny Posenitskiy <posenitskiy@irsamc.ups-tlse.fr> Wed, 16 Feb 2022 15:07:02 +0100

39
debian/README.md vendored Normal file
View File

@ -0,0 +1,39 @@
# Debian packages from Autotools project
Following the [debian guide](https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#autotools-single).
## Requirements
- debmake
- debuild
- debhelper
- dh-autoreconf
## First release
1. Download and extract the Autotools-produced distribution tarball (e.g. `trexio-2.1.0.tar.gz`)
2. `cp trexio-2.1.0.tar.gz libtrexio_2.1.0.orig.tar.gz` --> important for step 4
3. `cd trexio-2.1.0`
4. `debmake`
This will create `debian` folder with some pre-filled templates, which have to be checked and modified
according to your project (e.g. prepend `lib` for library packages).
## Release updates
This relies on the previously created and modified templates in the `debian` directory.
1. `debuild` --> this creates the debian packages in the parent directory, i.e. one level higher than `trexio-2.1.0/` directory
2. `dpkg -f libtrexio_2.1.0-1_amd64.deb pre-depends depends recommends conflicts break`
**Note for maintainers:** to battle-test your build process, it can be a good idea to run `debuild` in a `chroot` environment
as opposed to the host. For example, `pbuilder` can be used to create an isolated `chroot`
and to build a debian package within it (see `pdebuild` wrapper command).
## Make
TREXIO supplies `make debian_from_dist` rule to produce a `libtrexio` debian package.
It relies on specifications in the `debian/` folder.
This rule should be executed in the source code distribution (extracted from the tarball) and **not in the GitHub repo clone**.
It also requires the tarball distribution (e.g. `trexio-2.1.0.tar.gz`) to be present in the **parent** directory.

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
libtrexio (2.1.0-1) UNRELEASED; urgency=low
* Initial release.
-- Evgeny Posenitskiy <posenitskiy@irsamc.ups-tlse.fr> Wed, 16 Feb 2022 15:07:02 +0100

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
11

15
debian/control vendored Normal file
View File

@ -0,0 +1,15 @@
Source: libtrexio
Section: science
Priority: optional
Maintainer: Evgeny Posenitskiy <posenitskiy@irsamc.ups-tlse.fr>
Build-Depends: gfortran, pkg-config, libhdf5-dev, debhelper (>=11~), dh-autoreconf
Standards-Version: 4.1.4
Homepage: https://trex-coe.github.io/trexio/
Package: libtrexio
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: I/O library for quantum chemistry.
This Debian binary package was auto-generated by the
debmake(1) command provided by the debmake package.

366
debian/copyright vendored Normal file
View File

@ -0,0 +1,366 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libtrexio
Source: <url://github.com/TREX-CoE/trexio>
#
# Please double check copyright with the licensecheck(1) command.
Files: .git_hash
AUTHORS
Makefile.am
CMakeLists.txt
NEWS
README
cmake/cmake_uninstall.cmake.in
cmake/FindTREXIO.cmake
configure.ac
docs/.htmlizer
docs/trexio.css
include/config.h.in
include/trexio.h
include/trexio_f.f90
pkgconfig/trexio.pc.in
src/CMakeLists.txt
src/trexio.c
src/trexio_hdf5.c
src/trexio_hdf5.h
src/trexio_private.h
src/trexio_s.h
src/trexio_text.c
src/trexio_text.h
tests/CMakeLists.txt
tests/io_all.c
tests/io_dset_float_hdf5.c
tests/io_dset_float_text.c
tests/io_dset_int_hdf5.c
tests/io_dset_int_text.c
tests/io_dset_sparse_hdf5.c
tests/io_dset_sparse_text.c
tests/io_dset_str_hdf5.c
tests/io_dset_str_text.c
tests/io_num_hdf5.c
tests/io_num_text.c
tests/io_safe_dset_float_hdf5.c
tests/io_safe_dset_float_text.c
tests/io_str_hdf5.c
tests/io_str_text.c
tests/open_hdf5.c
tests/open_text.c
tests/overwrite_all_hdf5.c
tests/overwrite_all_text.c
tests/test_f.f90
tests/trexio_f.f90
Copyright: 2020 TREX Center of Excellence
License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.
On Debian systems, the complete text of the BSD 3-clause "New" or "Revised"
License can be found in `/usr/share/common-licenses/BSD'.
Files: Makefile.in
aclocal.m4
compile
config.guess
config.sub
configure
depcomp
install-sh
ltmain.sh
m4/ax_lib_hdf5.m4
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
Copyright: 1992-2018 Free Software Foundation, Inc.
1994 X Consortium
2009 Timothy Brown <tbrown@freeshell.org>
2010 Rhys Ulerich <rhys.ulerich@gmail.com>
License: __AUTO_PERMISSIVE__
Autogenerated files with permissive licenses.
Files: ar-lib
build-config/ar-lib
build-config/compile
build-config/missing
build-config/test-driver
Copyright: 1996-2018 Free Software Foundation, Inc.
License: GPL-2.0+ with autoconf exception
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that program.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: build-config/install-sh
Copyright: 1994 X Consortium
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.
Except as contained in this notice, the name of the X Consortium shall not
be used in advertising or otherwise to promote the sale, use or other deal-
ings in this Software without prior written authorization from the X Consor-
tium.
.
FSF changes to this file are in the public domain.
.
Calling this script install-sh is preferred over install.sh, to prevent
'make' implicit rules from creating a file called install from it
when there is no Makefile.
.
This script is compatible with the BSD install script, but was written
from scratch.
Files: INSTALL
Copyright: 1994-2016 Free Software Foundation, Inc.
License: PERMISSIVE
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
.
Basic Installation
Files: build-config/ltmain.sh
Copyright: 1996-2015 Free Software Foundation, Inc.
License: GPL-2.0+ with libtool exception
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
GNU Libtool is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
As a special exception to the GNU General Public License,
if you distribute this file as part of a program or library that
is built using GNU Libtool, you may include this file under the
same distribution terms that you use for the rest of that program.
.
GNU Libtool is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: build-config/depcomp
Copyright: 1999-2018 Free Software Foundation, Inc.
License: GPL-2.0+ with autoconf exception
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that program.
.
Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: build-config/config.guess
Copyright: 1992-2018 Free Software Foundation, Inc.
License: GPL-3.0+ with autoconf exception
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>.
.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that
program. This Exception is an additional permission under section 7
of the GNU General Public License, version 3 ("GPLv3").
.
Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
.
On Debian systems, the complete text of the GNU General Public License
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
Files: build-config/config.sub
Copyright: 1992-2018 Free Software Foundation, Inc.
License: GPL-3.0+ with autoconf exception
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>.
.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that
program. This Exception is an additional permission under section 7
of the GNU General Public License, version 3 ("GPLv3").
.
On Debian systems, the complete text of the GNU General Public License
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
Files: m4/ax_pkg_swig.m4
Copyright: 2008 Alan W. Irwin
2008 Andrew Collier
2008 Rafael Laboissiere <rafael@laboissiere.net>
2008 Sebastian Huber <sebastian-huber@web.de>
2011 Murray Cumming <murrayc@openismus.com>
2021 Vincent Danjean <Vincent.Danjean@ens-lyon.org>
License: GPL-2.0+ with unknown exception *** check multiple exceptions ***
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>.
.
As a special exception, the respective Autoconf Macro's copyright owner
gives unlimited permission to copy, distribute and modify the configure
scripts that are the output of Autoconf when processing the Macro. You
need not follow the terms of the GNU General Public License when using
or distributing such scripts, even though portions of the text of the
Macro appear in them. The GNU General Public License (GPL) does govern
all other use of the material that constitutes the Autoconf Macro.
.
This special exception to the GPL applies to versions of the Autoconf
Macro released by the Autoconf Archive. When you make and distribute a
modified version of the Autoconf Macro, you may extend this special
exception to the GPL to apply to your modified version as well.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
#----------------------------------------------------------------------------
# xml and html files (skipped):
# docs/tutorial_benzene.html
# docs/index.html
# docs/examples.html
# docs/trex.html
# docs/templator_hdf5.html
# docs/templator_text.html
# docs/templator_front.html
# docs/README.html
#----------------------------------------------------------------------------
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
# license/copyright files.
#----------------------------------------------------------------------------
# License file: COPYING
BSD 3-Clause License
.
Copyright (c) 2021, TREX Center of Excellence
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
# You must remove unused comment lines for the released package.

9
debian/rules vendored Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@ --with autoreconf

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
debian/source/local-options vendored Normal file
View File

@ -0,0 +1,2 @@
#abort-on-upstream-changes
#unapply-patches

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
# You must remove unused comment lines for the released package.
version=3