summaryrefslogtreecommitdiffstats
path: root/tests/t_installfiles_patterns_and_links
blob: 1e9a6e4cfa5f692d31ef385906a417882019f25c (plain)
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
#!/bin/sh
#
# opkhelper
# tests/t_installfiles_patterns_and_links
#
# Copyright (C) 2013  Patrick "P. J." McDermott
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.

mkdir -p libfoo.1.pkg libfoo-dev.pkg
cat >libfoo.1.pkg/files <<-EOF
	/usr/lib/*/libfoo.so.*
	EOF
cat >libfoo-dev.pkg/files <<-EOF
	/usr/lib/*/libfoo.so
	EOF

mkdir -p tmp/dest/usr/lib/arch
>tmp/dest/usr/lib/arch/libfoo.so.1.0.0
ln -sf libfoo.so.1.0.0 tmp/dest/usr/lib/arch/libfoo.so.1
ln -sf libfoo.so.1 tmp/dest/usr/lib/arch/libfoo.so

cd tmp
OPK_PACKAGES='foo libfoo.1 libfoo-dev' oh-installfiles
assert test_non_dir_nodes dest
assert test_nodes libfoo.1.data / /usr/ /usr/lib/ /usr/lib/arch/ \
	/usr/lib/arch/libfoo.so.1.0.0 /usr/lib/arch/libfoo.so.1@
assert test_nodes libfoo-dev.data / /usr/ /usr/lib/ /usr/lib/arch/ \
	/usr/lib/arch/libfoo.so@
cd ..

rm -Rf foo.pkg libfoo.1.pkg libfoo-dev.pkg tmp