Base d'empaquetage Debian
This commit is contained in:
parent
08f7bcc67c
commit
ac26cd2724
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -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"
|
|
@ -0,0 +1,59 @@
|
|||
#!/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" 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:
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
Loading…
Reference in New Issue