Initial structure for debian packaging

This commit is contained in:
Timothée Floure 2018-06-29 13:55:45 +02:00
parent ddf8cb7f78
commit 3270c06338
10 changed files with 142 additions and 0 deletions

58
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,58 @@
stages:
- setup
- build
- checking
- deploy
# Build package using dpkg-buildpackage
run-build:
stage: build
tags:
- debian
- generic
script:
- echo 'Acquire::http { Proxy "http://rapperswil:3142"; };' > /etc/apt/apt.conf.d/02proxy
- apt-get update -qy
- apt-get install -y dpkg-dev debhelper
- dpkg-buildpackage -us -uc
- mkdir build-artifacts
- mv ../unipoly-mlmmj-ldap-sync* build-artifacts/
artifacts:
paths:
- build-artifacts
# Check built package using lintian.
run-checking:
stage: checking
tags:
- debian
- generic
script:
- echo 'Acquire::http { Proxy "http://rapperswil:3142"; };' > /etc/apt/apt.conf.d/02proxy
- apt-get update -qy
- apt-get install -y lintian
- lintian -i build-artifacts/unipoly-mlmmj-ldap-sync*.changes
# Deploy the built package to rapperswil
.run-deploy:
stage: deploy
variables:
only:
- tags
except:
- /^(?!master).+@/
tags:
- debian
- generic
before_script:
- 'which ssh-agent || (apt-get update -qy && apt-get install openssh-client -y)'
- eval $(ssh-agent -s)
- echo "$CD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- apt-get update -qy
- apt-get install -y dput
- 'echo "$CD_MINIDINSTALL_CONFIG" > ~/.dput.cf'
- 'dput -u gnugen build-artifacts/unipoly-mlmmh-ldap-sync*.changes'

7
Makefile Normal file
View file

@ -0,0 +1,7 @@
PREFIX ?= /usr
build:
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp unipoly-mlmmj-ldap-sync.rb $(DESTDIR)$(PREFIX)/bin/unipoly-mlmmj-ldap-sync

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
unipoly-mlmmj-ldap-sync (0.1) unstable; urgency=low
* Let there be package.
-- Timothée Floure <timothee.floure@epfl.ch> Fri, 29 Jun 2018 12:02:05 +0200

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
9

15
debian/control vendored Normal file
View file

@ -0,0 +1,15 @@
Source: unipoly-mlmmj-ldap-sync
Section: admin
Priority: optional
Maintainer: Timothée Floure <timothee.floure@epfl.ch>
Build-Depends: debhelper (>= 9)
Standards-Version: 4.1.1
Homepage: https://gitlab.gnugen.ch/gnugen-externs/unipoly/mlmmj-ldap-sync
Vcs-Git: git://gitlab.gnugen.ch/gnugen-extenrs/unipoly/mlmmj-ldap-sync.git
Package: unipoly-mlmmj-ldap-sync
Architecture: all
Depends: ruby, ruby-net-ldap, ruby-toml, ${misc:Depends}
Description: Cronjobs to maintain the synchronization of Unipoly's mailing lists.
This package installs cronjobs to maintain the synchronization between
unipoly's LDAP tree and mailing lists.

26
debian/copyright vendored Normal file
View file

@ -0,0 +1,26 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: 2018 Timothée Floure <timothee.floure@fnux.ch>
License: Apache-2.0
Files: debian/*
Copyright: 2018 Timothée Floure <timothee.floure@epfl.ch>
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

1
debian/docs vendored Normal file
View file

@ -0,0 +1 @@
RADME.md

28
debian/rules vendored Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@
# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

1
debian/source/format vendored Normal file
View file

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