Diff

Differences From Artifact [b2cfeaf6b7]:

To Artifact [374de8e6fe]:


29
30
31
32
33
34
35















36
37
38
39
40
41
42
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







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








# Extract files
(
	cd "${WORKDIR}/root" || exit 1

	cpio -i --no-absolute-filenames --quiet --make-directories < "${TMPCPIOFILE}"
) || exit 1

# Rename "lib64" directory for Debian-based distributions
(
	cd "${WORKDIR}/root" || exit 1

	if [ -d usr/lib64 ]; then
		mv usr/lib64 usr/lib || exit 1
	fi

	if [ -d lib64 ]; then
		mv lib64 lib || exit 1
	fi

	exit 0
) || exit 1

# Create control files
(
	cd "${WORKDIR}/root" || exit 1

	## Create MD5 Sums
	find . -type f | xargs md5sum > "${WORKDIR}/control/md5sums"
54
55
56
57
58
59
60
61

62
63

64
65
66
67
68
69
70
71
72
73
74
75
69
70
71
72
73
74
75

76
77

78
79
80
81
82
83
84
85
86
87
88
89
90







-
+

-
+












# Create debian-binary
echo '2.0' > "${WORKDIR}/deb/debian-binary"

# Create Data archive
(
	cd "${WORKDIR}/root" || exit 1

	cpio -i --list --quiet < "${TMPCPIOFILE}" > "${WORKDIR}/rpm-filelist"
	find . -type f > "${WORKDIR}/out-filelist"

	tar --files-from "${WORKDIR}/rpm-filelist" -cf - | tardy -User root -Group root | gzip -9c > "${WORKDIR}/deb/data.tar.gz" 
	tar --files-from "${WORKDIR}/out-filelist" -cf - | tardy -User root -Group root | gzip -9c > "${WORKDIR}/deb/data.tar.gz" 
) || exit 1

# Create Debian package
(
	cd "${WORKDIR}/deb" || exit 1

	ar rcu "${WORKDIR}/tmp.deb" debian-binary control.tar.gz data.tar.gz
)

cp "${WORKDIR}/tmp.deb" "${DEBFILE}"

rm -rf "${WORKDIR}"