2016-05-09 02:48:42 +02:00
|
|
|
|
#!/usr/bin/make -f
|
2016-05-10 14:08:13 +02:00
|
|
|
|
#******************************************************************************#
|
|
|
|
|
# #
|
|
|
|
|
# debian/rules #
|
|
|
|
|
# | Project : libmonochrome #
|
|
|
|
|
# #
|
|
|
|
|
# By: thomas <thomas@touhey.fr> #
|
|
|
|
|
# Last updated: 2015/12/23 10:02:49 #
|
|
|
|
|
# #
|
|
|
|
|
#******************************************************************************#
|
|
|
|
|
# Who said you had to use automatic tools to make Debian packages ? #
|
|
|
|
|
#******************************************************************************#
|
|
|
|
|
# LOAD CONFIG
|
2016-05-18 19:55:20 +02:00
|
|
|
|
include $(CURDIR)/rules.cfg
|
2016-05-09 02:48:42 +02:00
|
|
|
|
|
2016-05-10 14:08:13 +02:00
|
|
|
|
# STYLE VARS
|
|
|
|
|
define \n
|
2016-05-09 02:48:42 +02:00
|
|
|
|
|
2016-05-10 14:08:13 +02:00
|
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# RULES
|
|
|
|
|
## Build the source into compiled programs/formatted documents in the build-tree.
|
|
|
|
|
build: build-arch build-indep
|
|
|
|
|
|
|
|
|
|
## Build the source into arch-dependent formatted documents in the build-tree.
|
|
|
|
|
build-arch:
|
|
|
|
|
|
|
|
|
|
## Build the source into arch-independent formatted documents in the build-tree.
|
|
|
|
|
build-indep:
|
|
|
|
|
make -C ..
|
|
|
|
|
|
|
|
|
|
## Install files into a file tree for each binary package under the debian dir.
|
|
|
|
|
## If defined, binary* targets effectively depend on this target.
|
|
|
|
|
install:
|
2016-05-18 19:55:20 +02:00
|
|
|
|
$(foreach lib, $(LIB), \
|
|
|
|
|
$(INST) -m 644 ../$(LIBDIR)/$(lib) $(ARCH)$(LIBROOT)/$(lib)$(\n))
|
|
|
|
|
$(foreach inc, $(INC), \
|
|
|
|
|
$(INST) -m 644 ../$(INCDIR)/$(inc) $(ARCH)$(INCROOT)/$(inc)$(\n))
|
|
|
|
|
$(foreach man, $(MAN), \
|
|
|
|
|
$(INST) -m 644 ../$(MANDIR)/$(man) $(ARCH)$(MANROOT)/$(man)$(\n))
|
2016-05-10 14:08:13 +02:00
|
|
|
|
|
|
|
|
|
## Create all binary packages
|
|
|
|
|
binary: binary-arch binary-indep
|
|
|
|
|
|
|
|
|
|
## Create arch-dependent binary packages in the parent directory
|
|
|
|
|
binary-arch:
|
|
|
|
|
|
|
|
|
|
## Create arch-independent binary packages in the parent directory
|
|
|
|
|
binary-indep:
|
|
|
|
|
cd all && tar cf ../data.tar.gz *
|
|
|
|
|
rm -f md5sums
|
|
|
|
|
cd $(ARCH) && for i in $$(find * -type f); do md5sum "$$i" >> ../md5sums; done
|
|
|
|
|
tar cf control.tar.gz control md5sums
|
|
|
|
|
ar rc ../$(PKG)_$(VERSION)_$(ARCH).deb data.tar.gz control.tar.gz debian-binary
|
|
|
|
|
rm data.tar.gz control.tar.gz md5sums
|
|
|
|
|
|
|
|
|
|
## Clean all compiled/generated/useless files in the build-tree.
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf $(ARCH)
|
|
|
|
|
make -C .. fclean
|
|
|
|
|
|
|
|
|
|
## Non-standard: remakes everything
|
|
|
|
|
re: clean build install binary
|
|
|
|
|
|
|
|
|
|
## Phony everything
|
|
|
|
|
.PHONY: build build-arch build-indep install binary binary-arch binary-indep clean re
|
|
|
|
|
|
|
|
|
|
# END OF FILE
|