summarylogtreecommitdiffstats
path: root/libx32-e2fsprogs.install
blob: 771de20632bb32ea0b5b40b646a9503359823abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
    mv /usr/include/ext2fs/ext2_types.h /usr/include/ext2fs/ext2_types-64.h
    ln -s ext2_types-stub.h /usr/include/ext2fs/ext2_types.h
}

post_upgrade() {
    if [ ! -L /usr/include/ext2fs/ext2_types.h ]; then
        post_install
    elif [ ${1::-2} != ${2::-2} ]; then
        echo WARNING: libx32-e2fsprogs is upgraded before e2fsprogs,
        echo WARNING: you probably need to reinstall libx32-e2fsprogs.
    fi
}

post_remove() {
    if [ -L /usr/include/ext2fs/ext2_types.h ]; then
        rm /usr/include/ext2fs/ext2_types.h
        mv /usr/include/ext2fs/ext2_types-64.h /usr/include/ext2fs/ext2_types.h
    fi
}