Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Debian package build recipe to Makefile #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# BUILD COMMON
#########################################################################

VERSION ?= 1.0.0-rc10
CXXFLAGS = -std=c++11 -Wall -Wno-reorder -fPIC -pie -march=native \
-DVERSION=$(shell cat VERSION) -Wl,-rpath=/usr/share/e9tool/lib/
-DVERSION=$(VERSION) -Wl,-rpath=/usr/share/e9tool/lib/

E9PATCH_OBJS=\
src/e9patch/e9CFR.o \
Expand Down Expand Up @@ -181,3 +182,34 @@ tool.sanitize: $(E9TOOL_OBJS) $(E9TOOL_LIBS)
$(CXX) $(CXXFLAGS) $(E9TOOL_OBJS) $(E9TOOL_LIBS) -o e9tool \
$(E9TOOL_LDFLAGS)

DEB := e9patch_$(VERSION)_amd64.deb
deb: $(DEB)

$(DEB): install/debian-binary install/control.tar.gz install/data.tar.gz
fakeroot ar cr $@ $^

install/debian-binary: debian-dirs
echo 2.0 > $@

install/control.tar.gz: install/control/md5sums install/control/control
(cd install/control;\
tar cz --owner root --group root -f ../control.tar.gz .)

install/control/md5sums: install/data
find $< -type f | xargs md5sum | sed 's#$</##' > $@

install/control/control: debian-binary-control.m4
m4 -D VERSION=$(VERSION) $< > $@

install/data.tar.gz: install/data
(cd $<; tar cz --owner root --group root -f ../data.tar.gz .)

install/data: DESTDIR := install/data
install/data: tool release install

debian-dirs:
mkdir -p install/control

.PHONY: all clean install\
release debug sanitize tool tool.debug tool.sanitize\
deb debian-dirs
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

15 changes: 15 additions & 0 deletions debian-binary-control.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Package: e9patch
Version: VERSION
Maintainer: Gregory J. Duck <[email protected]>
Section: universe/devel
Priority: optional
Homepage: https://github.com/GJDuck/e9patch
Architecture: amd64
Depends: libc6 (>= 2.14), zlib1g (>= 1:1.2.2.3)
Description: The E9Patch static binary rewriting system
E9Patch is a powerful static rewriting system for stripped x86_64 Linux ELF
and Windows PE binaries. E9Patch is primarily designed for robustness, and
can scale to very large/complex binaries without introducing rewriting
errors.
.
This package also includes the E9Tool frontend for E9Patch.
76 changes: 0 additions & 76 deletions install.sh

This file was deleted.