trying to create a debian package
This commit is contained in:
parent
1b51842fce
commit
a73a17d9bb
|
@ -0,0 +1,6 @@
|
||||||
|
barrier (2.0.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- Tru Huynh <tru@pasteur.fr> Fri, 8 Mar 2018 23:00 +01:00
|
||||||
|
|
|
@ -1,5 +1,73 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --buildsystem=cmake --builddirectory=build -Pbuild/debian --parallel
|
|
||||||
|
|
||||||
|
# Name of the package
|
||||||
|
package=barrier
|
||||||
|
|
||||||
|
|
||||||
|
# Top directory of the source code (thanks Manoj)
|
||||||
|
SRCTOP := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
|
||||||
|
# Destination directory where files will be installed
|
||||||
|
DESTDIR = $(SRCTOP)/debian/$(package)
|
||||||
|
|
||||||
|
# Definition of directories
|
||||||
|
BIN_DIR = $(DESTDIR)/usr/bin
|
||||||
|
GAMES_DIR = $(DESTDIR)/usr/games
|
||||||
|
SHARE_DIR = $(DESTDIR)/usr/share/barrier
|
||||||
|
DOCS_DIR = $(DESTDIR)/usr/share/doc/barrier
|
||||||
|
MAN_DIR = $(DESTDIR)/usr/share/man/man1
|
||||||
|
MAN_GAMES_DIR = $(DESTDIR)/usr/share/man/man6
|
||||||
|
MENU_DIR = $(DESTDIR)/usr/lib/menu
|
||||||
|
PIXMAPS_DIR = $(DESTDIR)/usr/share/pixmaps
|
||||||
|
|
||||||
|
# Stamp Rules
|
||||||
|
|
||||||
|
configure-stamp:
|
||||||
|
touch configure-stamp
|
||||||
|
|
||||||
|
build-stamp: configure-stamp
|
||||||
|
cp dist/rpm/build_env.sh .
|
||||||
|
./clean_build.sh
|
||||||
|
-rm -f build-stamp
|
||||||
|
touch build-stamp
|
||||||
|
|
||||||
|
# Debian rules
|
||||||
|
|
||||||
|
build: build-stamp
|
||||||
|
|
||||||
|
clean: configure-stamp
|
||||||
|
-rm -f *-stamp
|
||||||
|
-rm -rf debian/$(package)
|
||||||
|
-rm -f debian/files
|
||||||
|
-rm -f debian/substvars
|
||||||
|
|
||||||
|
binary-indep: build
|
||||||
|
|
||||||
|
# Definitions for install
|
||||||
|
INST_OWN = -o root -g root
|
||||||
|
MAKE_DIR = install -p -d $(INST_OWN) -m 755
|
||||||
|
INST_FILE = install -c $(INST_OWN) -m 644
|
||||||
|
INST_PROG = install -c $(INST_OWN) -m 755 -s
|
||||||
|
INST_SCRIPT = install -c $(INST_OWN) -m 755
|
||||||
|
|
||||||
|
binary-arch: build
|
||||||
|
|
||||||
|
|
||||||
|
$(MAKE_DIR) $(BIN_DIR)
|
||||||
|
cp build/bin/* $(BIN_DIR)
|
||||||
|
|
||||||
|
# Work out the shared library dependancies (thanks Helen)
|
||||||
|
dpkg-shlibdeps $(BIN_DIR)/*
|
||||||
|
|
||||||
|
# Generate the control file (thanks Helen)
|
||||||
|
dpkg-gencontrol -isp -P$(DESTDIR)
|
||||||
|
|
||||||
|
# Make DEBIAN/md5sums (thanks Helen)
|
||||||
|
cd $(DESTDIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
||||||
|
|
||||||
|
# Create the .deb package (thanks Helen)
|
||||||
|
dpkg-deb -b $(DESTDIR) ../
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
|
||||||
|
.PHONY: binary binary-arch binary-indep clean build
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
3.0 (native)
|
|
Loading…
Reference in New Issue