-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathMakefile
166 lines (131 loc) · 4.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
OBJDIR := builddir
PREFIX ?= /usr
DESTDIR ?=
INSTALL_DIR ?= $(shell pwd)/dist/protonfixes
.PHONY: all
all: xrandr-dist cabextract-dist libmspack-dist unzip-dist python-xlib-dist
.PHONY: install
# Note: `export DEB_BUILD_MAINT_OPTIONS=hardening=-format` is required for the unzip target
install: protonfixes-install xrandr-install cabextract-install libmspack-install unzip-install python-xlib-install
#
# protonfixes
#
.PHONY: protonfixes
protonfixes-install: protonfixes
$(info :: Installing protonfixes )
install -d $(INSTALL_DIR)
cp -r gamefixes-* $(INSTALL_DIR)
cp -r verbs $(INSTALL_DIR)
cp *.py $(INSTALL_DIR)
cp winetricks $(INSTALL_DIR)
cp umu-database.csv $(INSTALL_DIR)
rm $(INSTALL_DIR)/protonfixes_test.py
#
# xrandr
#
$(OBJDIR)/.build-xrandr-dist: | $(OBJDIR)
$(info :: Installing xorg-macros )
cd subprojects/xutils-dev/util-macros && \
autoreconf -iv && \
./configure --prefix=/usr && \
make DESTDIR=$(INSTALL_DIR) install
$(info :: Building xrandr )
cd subprojects/x11-xserver-utils/xrandr && \
autoreconf -iv -I$(INSTALL_DIR)/usr/share/aclocal && \
./configure --prefix=/usr && \
make
touch $(@)
.PHONY: xrandr-dist
xrandr-dist: $(OBJDIR)/.build-xrandr-dist
xrandr-install: xrandr-dist
$(info :: Installing xrandr )
# Install
cd subprojects/x11-xserver-utils/xrandr && \
make DESTDIR=$(INSTALL_DIR) install
# Post install
cp $(INSTALL_DIR)/usr/bin/xrandr $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr
#
# cabextract
#
$(OBJDIR)/.build-cabextract-dist: | $(OBJDIR)
$(info :: Building cabextract )
cd subprojects/libmspack/cabextract && \
./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man && \
make
touch $(@)
.PHONY: cabextract-dist
cabextract-dist: $(OBJDIR)/.build-cabextract-dist
cabextract-install: cabextract-dist
$(info :: Installing cabextract )
cd subprojects/libmspack/cabextract && \
make DESTDIR=$(INSTALL_DIR) install
cp $(INSTALL_DIR)/usr/bin/cabextract $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr
#
# libmspack
#
$(OBJDIR)/.build-libmspack-dist: | $(OBJDIR)
$(info :: Building libmspack )
cd subprojects/libmspack/libmspack && \
autoreconf -vfi && \
./configure --prefix=/usr --disable-static --sysconfdir=/etc --localstatedir=/var && \
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool && \
make
touch $(@)
.PHONY: libmspack-dist
libmspack-dist: $(OBJDIR)/.build-libmspack-dist
libmspack-install: libmspack-dist
$(info :: Installing libmspack )
cd subprojects/libmspack/libmspack && \
make DESTDIR=$(INSTALL_DIR) install
cp -d $(INSTALL_DIR)/usr/lib/libmspack* $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr
rm $(INSTALL_DIR)/libmspack.la
#
# unzip
#
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
CC = $(DEB_HOST_GNU_TYPE)-gcc
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
DEFINES = -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \
-DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
-DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DIZ_HAVE_UXUIDGID -DNOMEMCPY \
-DNO_WORKING_ISPRINT
$(OBJDIR)/.build-unzip-dist: | $(OBJDIR)
$(info :: Building unzip )
cd subprojects/unzip && \
dpkg-source --before-build . && \
make -f unix/Makefile prefix=/usr D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 CC="$(CC) -Wall" LF2="$(LDFLAGS)" CF="$(CFLAGS) $(CPPFLAGS) -I. $(DEFINES)" unzips
touch $(@)
.PHONY: unzip-dist
unzip-dist: $(OBJDIR)/.build-unzip-dist
unzip-install: unzip-dist
$(info :: Installing unzip )
cd subprojects/unzip && \
make -f unix/Makefile prefix=$(INSTALL_DIR) install
# Post install
cp -a $(INSTALL_DIR)/bin/unzip $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/bin $(INSTALL_DIR)/man
#
# python-xlib
#
$(OBJDIR)/.build-python-xlib-dist: | $(OBJDIR)
$(info :: Building python-xlib )
cd subprojects/python-xlib && \
dpkg-source --before-build . && \
dh_auto_build -O--buildsystem=pybuild
touch $(@)
.PHONY: python-xlib-dist
python-xlib-dist: $(OBJDIR)/.build-python-xlib-dist
python-xlib-install: python-xlib-dist
$(info :: Installing python-xlib )
mkdir $(INSTALL_DIR)/_vendor && \
cd subprojects/python-xlib && \
dh_auto_install -O--buildsystem=pybuild && \
find debian/tmp -type d -name Xlib | xargs -I {} mv {} $(INSTALL_DIR)/_vendor; \
$(OBJDIR):
@mkdir -p $(@)