Compare commits

...

2 Commits

Author SHA1 Message Date
fa62c65c02 'Vendoring' des dépendances avant construction 2019-08-05 16:31:33 +02:00
ac26cd2724 Base d'empaquetage Debian 2019-08-05 16:14:35 +02:00
5 changed files with 87 additions and 0 deletions

11
debian/cadoles-profile.service vendored Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Application de modification de profil LDAP en "self-service"
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/cadoles-profile -workdir /usr/share/cadoles-profile -config /etc/cadoles-profile/server.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: cadoles-profile
Section: unknown
Priority: optional
Maintainer: Cadoles <contact@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/Cadoles/cadoles-profile
Vcs-Git: http://forge.cadoles.com/Cadoles/cadoles-profile.git
Vcs-Browser: http://forge.cadoles.com/Cadoles/cadoles-profile
Package: cadoles-profile
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Application de modification de profil LDAP en "self-service"

60
debian/rules vendored Normal file
View File

@ -0,0 +1,60 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
GO_VERSION := 1.12.7
OS := linux
ARCH := amd64
GOPATH=$(HOME)/go
ifeq (, $(shell which go 2>/dev/null))
override_dh_auto_build: install-go
endif
ifeq (, $(shell which mage 2>/dev/null))
override_dh_auto_build: install-mage
endif
# ifeq (, $(shell which node 2>/dev/null))
# override_dh_auto_build: install-nodejs
# endif
%:
dh $@ --with systemd
override_dh_auto_build: $(GOPATH)
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" mage -v installDeps
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" go mod vendor
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" ARCH_TARGETS=$(ARCH) mage -v release
$(GOPATH):
mkdir -p $(GOPATH)
install-go:
wget https://dl.google.com/go/go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
tar -C /usr/local -xzf go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
install-mage: $(GOPATH)
GOPATH=$(GOPATH) misc/mage/install
# install-nodejs:
# curl -sL https://deb.nodesource.com/setup_8.x | bash -
# apt-get install -y nodejs
# npm install -g yarn
override_dh_auto_install:
mkdir -p debian/cadoles-profile/usr/share/cadoles-profile
mkdir -p debian/cadoles-profile/etc/cadoles-profile
mkdir -p debian/cadoles-profile/usr/bin
cp -r release/cadoles-profile-$(OS)-$(ARCH)/* debian/cadoles-profile/usr/share/cadoles-profile/
mv debian/cadoles-profile/usr/share/cadoles-profile/bin/server debian/cadoles-profile/usr/bin/cadoles-profile
mv debian/cadoles-profile/usr/share/cadoles-profile/server.conf debian/cadoles-profile/etc/cadoles-profile/server.conf
install -d debian/cadoles-profile
override_dh_strip:

1
debian/source/format vendored Normal file
View File

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