aboutsummaryrefslogtreecommitdiff
path: root/base/fs_ext/fs_ext.build
blob: fc05ed8ce11396d4ff8ceb7dff60b82c81636b4f (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
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
#!/bin/bash
#
# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>

source /usr/src/ports/Build/build.sh

NAME=fs_ext
VERSION=1.42.7
BUILD=1
OPTIONS="noinfoz"

# Description

cat > ${PKG}/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

$(padd)|-----handy-ruler------------------------------------------------------|
${NAME}: fs_ext (extended filesystems utilities)
${NAME}:
${NAME}: Utilities needed to create and maintain ext2, ext3 and ext4
${NAME}: filesystems.
${NAME}:
${NAME}: These utilities were written by Remy Card (the developer and
${NAME}: maintainer of the ext2 fs) and Theodore T'so.
${NAME}:
${NAME}:
${NAME}:
${NAME}:
EOF

cat >> ${PKG}/install/doinst.sh <<EOF
#!/bin/sh

config() {
  NEW="\$1"
  OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r \$OLD ]; then
    mv \$NEW \$OLD
  elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
    # toss the redundant copy
    rm \$NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}

install_info()
{
  for file in "\${*}"; do
    if [ -x usr/bin/install-info ]; then
      usr/bin/install-info --info-dir=usr/share/info usr/share/info/\${file}.info.xz 2> /dev/null
    fi
  done
}

config etc/mke2fs.conf.new

# Install texinfo files

install_info libext2fs
EOF

# Sources

SRCNAME[0]=e2fsprogs
SRCVERS[0]=${VERSION}
SRCPACK[0]=http://kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${SRCVERS[0]}/${SRCNAME[0]}-${SRCVERS[0]}.tar.xz
SRCCOPY[0]="GPL2 LGPL2"

build0()
{
sed -i 's|$(libdir)/pkgconfig|$(datadir)/pkgconfig|g' */*/Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
 --build="${ARCH}-slackware-linux" \
 --disable-rpath \
 --prefix="${SYS_DIR[usr]}" \
 --mandir="${SYS_DIR[man]}" \
 --infodir="${SYS_DIR[info]}" \
 --docdir="${SYS_DIR[doc]}/${SRCNAME[0]}-${SRCVERS[0]}" \
 --sysconfdir="${SYS_DIR[etc]}" \
 --libdir="${SYS_DIR[lib]}" \
 --localstatedir="${SYS_DIR[var]}" \
 --enable-elf-shlibs \
 --disable-libblkid \
 --disable-libuuid \
 --disable-uuidd
make ${JOBS} V=1
make install install-libs DESTDIR="${PKG}"
changelog RELEASE-NOTES
mv \
 ${PKG}${SYS_DIR[etc]}/mke2fs.conf \
 ${PKG}${SYS_DIR[etc]}/mke2fs.conf.new
(
  for fstype in ext2 ext3 ext4 ext4dev; do
    cd ${PKG}${SYS_DIR[sbin]}
    rm -f fsck.${fstype} mkfs.${fstype}
    ln -sf mke2fs mkfs.${fstype}
    ln -sf e2fsck fsck.${fstype}
    cd ${PKG}${SYS_DIR[man]}/man8
    rm -f fsck.${fstype} mkfs.${fstype}
    echo ".so man8/mke2fs.8" > mkfs.${fstype}
    echo ".so man8/e2fsck.8" > fsck.${fstype}
  done
)
(
  cd ${PKG}${SYS_DIR[sbin]}
  rm -f e2label findfs
  ln -sf tune2fs e2label
  ln -sf mke2fs mke3fs
  ln -sf mke2fs mke4fs
  cd ${PKG}${SYS_DIR[man]}/man8
  echo ".so man8/mke2fs.8" > mke3fs.8
  echo ".so man8/mke2fs.8" > mke4fs.8
)
sed -i -e 's/^AWK=.*/AWK=awk/' "${PKG}/usr/bin/compile_et"
sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${PKG}/usr/bin/mk_cmds"
sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${PKG}/usr/bin/compile_et"
}