1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
3 pkgbase=xorg-server-ubuntu
4 pkgname=xorg-server-ubuntu
5 true && pkgname=('xorg-server-ubuntu' 'xorg-server-xephyr-ubuntu' 'xorg-server-xdmx-ubuntu' 'xorg-server-xvfb-ubuntu' 'xorg-server-xnest-ubuntu' 'xorg-server-common-ubuntu' 'xorg-server-devel-ubuntu')
7 pkgver=1.10.4.${_ubuntu_rel}
11 url="http://xorg.freedesktop.org"
12 makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto-ubuntu' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto')
14 source=(${url}/releases/individual/xserver/${pkgbase%-*}-${pkgver%.*}.tar.bz2
15 http://archive.ubuntu.com/ubuntu/pool/main/x/${pkgbase%-*}/${pkgbase%-*}_${pkgver%.*}-${_ubuntu_rel}.diff.gz
19 sha512sums=('8e3391c78e7d5e52041efe35badf04be49bbb8b7940c7694faadd1f6f555edc5afda554cb8f3524b3ae7cfe8d5e63b80ca715cf3855565820efff46641ecc9b5'
20 'dc30cb653f7cd2485e9136848042f80fe7ce209955ebcdbb898a924824066e5d7cd0b65cf52483faf60d01a6250a575d0a21b8741262880d7ad2e3e581a27019'
21 'ca1cda27016f7c269cbdecc45da36255afeef5c1973cc484544f9dfbf56ed1868365c93a4c7f93e3a23e5322f084ec0cdd137e15b43872aae7f0c03040028ce6'
22 'de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22'
23 '9a1a5568be751435daea720cfc4bad209d62545cc10ea2f49113c41669c8130809a680492256ef331757fe8539d2e0e5e9e67a36f7c48c8d92d9b3e957d28fa2')
26 pkgdesc="Xorg X server with Ubuntu's patches"
29 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
32 patch -Np1 -i "${srcdir}/${pkgbase%-*}_${pkgver%.*}-${_ubuntu_rel}.diff"
34 for i in $(cat debian/patches/series | grep -v '#'); do
35 patch -Np1 -i "debian/patches/${i}"
50 --enable-config-udev \
51 --disable-config-dbus \
56 --sysconfdir=/etc/X11 \
57 --localstatedir=/var \
58 --with-xkb-path=/usr/share/X11/xkb \
59 --with-xkb-output=/var/lib/xkb \
60 --with-fontrootdir=/usr/share/fonts \
63 --disable-strict-compilation \
66 --disable-devel-docs \
67 --disable-install-libxf86config \
71 --disable-xcalibrate \
74 --disable-xf86bigfont \
78 --disable-install-setuid \
84 --enable-screensaver \
89 --enable-xf86vidmode \
91 --enable-xfree86-utils \
92 --with-sha1=libgcrypt \
94 --with-fop=no `# build fix` \
96 --with-default-xkb-rules=evdev \
100 find . -name Makefile -exec \
102 -e 's/-Werror=int-to-pointer-cast//g' \
103 -e 's/-Werror=address//g' \
104 -e 's/-Werror=array-bounds//g' \
105 -e 's/-Werror=attributes//g' \
106 -e 's/-Werror=clobbered//g' \
107 -e 's/-Werror=format-security//g' \
108 -e 's/-Werror=implicit//g' \
109 -e 's/-Werror=incompatible-pointer-types//g' \
110 -e 's/-Werror=init-self//g' \
111 -e 's/-Werror=int-to-pointer-cast//g' \
112 -e 's/-Werror=main//g' \
113 -e 's/-Werror=missing-braces//g' \
114 -e 's/-Werror=nonnull//g' \
115 -e 's/-Werror=return-type//g' \
116 -e 's/-Werror=sequence-point//g' \
117 -e 's/-Werror=trigraphs//g' \
118 -e 's/-Werror=unknown-warning-option//g' \
119 -e 's/-Werror=unused-command-line-argument//g' \
120 -e 's/-Wformat-nonliteral//g' \
121 -e 's/-Wimplicit-function-declaration//g' \
122 -e 's/-Wparentheses//g' \
123 -e 's/-Werror=write-strings//g' \
124 -e 's/-Werror=pointer-to-int-cast//g' \
129 # Disable subdirs for make install rule to make splitting easier
130 sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \
131 -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \
132 -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \
133 -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \
137 package_xorg-server-common-ubuntu() {
138 pkgdesc="Xorg server common files"
139 depends=('xkeyboard-config' 'xorg-xkbcomp' 'xorg-setxkbmap' 'xorg-fonts-misc')
140 provides=('xorg-server-common')
141 conflicts=('xorg-server-common')
143 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
144 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common"
145 install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common"
147 make -C xkb DESTDIR="${pkgdir}" install-data
149 install -m755 -d "${pkgdir}/usr/share/man/man1"
150 install -m644 doc/man/Xserver.1 "${pkgdir}/usr/share/man/man1/"
152 install -m755 -d "${pkgdir}/usr/lib/xorg"
153 install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/"
156 package_xorg-server-ubuntu() {
157 pkgdesc="Xorg X server"
158 depends=(libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau xorg-server-common-ubuntu)
159 #Cannot put xf86-input-evdev-ubuntu in the dependencies - the AUR will
160 # cause a dependency loop due to the order the packages are installed
161 backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf')
162 provides=('x-server' 'xorg-server')
163 conflicts=('xorg-server')
166 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
167 make DESTDIR="${pkgdir}" install
169 install -m755 -d "${pkgdir}/etc/X11"
170 mv "${pkgdir}/usr/share/X11/xorg.conf.d" "${pkgdir}/etc/X11/"
171 install -m644 "${srcdir}/10-quirks.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
174 #This should be done by evdev
175 #install -m644 "debian/local/10-kbd.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
176 #install -m644 "debian/local/10-mouse.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
177 install -dm755 "${pkgdir}/lib/udev/"
178 install -m644 'debian/local/64-xorg-xkb.rules' "${pkgdir}/lib/udev/"
180 rmdir "${pkgdir}/usr/share/X11"
182 # Needed for non-mesa drivers, libgl will restore it
183 mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
184 "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg"
186 rm -rf "${pkgdir}/var"
188 rm -f "${pkgdir}/usr/share/man/man1/Xserver.1"
189 rm -f "${pkgdir}/usr/lib/xorg/protocol.txt"
191 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server"
192 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING"
194 rm -rf "${pkgdir}/usr/lib/pkgconfig"
195 rm -rf "${pkgdir}/usr/include"
196 rm -rf "${pkgdir}/usr/share/aclocal"
199 package_xorg-server-xephyr-ubuntu() {
200 pkgdesc="A nested X server that runs as an X application"
201 depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common-ubuntu)
202 provides=('xorg-server-xephyr')
203 conflicts=('xorg-server-xephyr')
205 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/kdrive"
206 make DESTDIR="${pkgdir}" install
208 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr"
209 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING"
212 package_xorg-server-xvfb-ubuntu() {
213 pkgdesc="Virtual framebuffer X server"
214 depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common-ubuntu)
215 provides=('xorg-server-xvfb')
216 conflicts=('xorg-server-xvfb')
218 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/vfb"
219 make DESTDIR="${pkgdir}" install
221 install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
222 install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/"
224 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb"
225 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING"
228 package_xorg-server-xnest-ubuntu() {
229 pkgdesc="A nested X server that runs as an X application"
230 depends=(libxfont libxext libgcrypt pixman xorg-server-common-ubuntu)
231 provides=('xorg-server-xnest')
232 conflicts=('xorg-server-xnest')
234 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/xnest"
235 make DESTDIR="${pkgdir}" install
237 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest"
238 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING"
241 package_xorg-server-xdmx-ubuntu() {
242 pkgdesc="Distributed Multihead X Server and utilities"
243 depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common-ubuntu)
244 provides=('xorg-server-xdmx')
245 conflicts=('xorg-server-xdmx')
247 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/dmx"
248 make DESTDIR="${pkgdir}" install
250 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx"
251 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING"
254 package_xorg-server-devel-ubuntu() {
255 pkgdesc="Development files for the X.Org X server"
256 depends=(xproto randrproto renderproto xextproto inputproto-ubuntu kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess)
257 provides=('xorg-server-devel')
258 conflicts=('xorg-server-devel')
260 cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
261 make DESTDIR="${pkgdir}" install
263 rm -rf "${pkgdir}/usr/bin"
264 rm -rf "${pkgdir}/usr/share/man"
265 rm -rf "${pkgdir}/usr/share/doc"
266 rm -rf "${pkgdir}/usr/share/X11"
267 rm -rf "${pkgdir}/usr/lib/xorg"
268 rm -rf "${pkgdir}/var"
270 install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel"
271 ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING"