Commit 53917b83 authored by PoroCYon's avatar PoroCYon
Browse files

fix autogen, update stuff

parent 54b8bcb9
......@@ -193,11 +193,114 @@ sspt_clean_config() {
abuild clean
abuild cleancache
}
EOF
elif [ -f "CMakeLists.txt" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
mkdir -p "$REL_DIR/cmake-build"
pushd "$REL_DIR/cmake-build" >/dev/null
cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=\$SSPT_DEST_DIR"
popd >/dev/null
}
sspt_build() {
pushd "$REL_DIR/cmake-build" >/dev/null
make -j$(nproc)
popd >/dev/null
}
sspt_install() {
pushd "$REL_DIR/cmake-build" >/dev/null
make install
popd >/dev/null
}
sspt_clean() {
pushd "$REL_DIR/cmake-build" >/dev/null
make clean
popd >/dev/null
}
sspt_clean_config() {
rm -rf "$REL_DIR/cmake-build"
}
EOF
elif [ -f "./configure.ac" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
autoreconf -i
"$REL_DIR/configure" "--prefix=\$SSPT_DEST_DIR"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR" "DESTDIR=\$SSPT_DEST_DIR"
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm -rf "$REL_DIR/configure" "$REL_DIR/"*akefile "$REL_DIR/"config.*
}
EOF
elif [ -f "./configure" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
"$REL_DIR/configure" "--prefix=\$SSPT_DEST_DIR"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR" "DESTDIR=\$SSPT_DEST_DIR"
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm -rf "$REL_DIR/"*akefile "$REL_DIR/"config.*
}
EOF
elif file_exists_glob ./*.pro; then
local PRO_FILE="$(find ./*.pro -maxdepth 1 -type f | head -1)"
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
qmake -makefile "$REL_DIR/$PRO_FILE"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR" "DESTDIR=\$SSPT_DEST_DIR"
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm "$REL_DIR/*akefile"
}
EOF
elif file_exists_glob ./*akefile; then # support GNUmakefile etc.
local MAKEFILE=$(find ./*akefile -maxdepth 1 -type f | head -1)
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
true
}
sspt_build() {
make -f "$MAKEFILE" -j$(nproc)
}
sspt_install() {
make -f "$MAKEFILE" install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR" "DESTDIR=\$SSPT_DEST_DIR"
}
sspt_clean() {
make -f "$MAKEFILE" clean
}
sspt_clean_config() {
true
}
EOF
elif [ -f "package.json" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
(>&2 echo "NOTE: npm doesn't honor \$SSPT_DEST_DIR")
>&2 echo "NOTE: npm doesn't honor \$SSPT_DEST_DIR"
}
sspt_build() {
true
......@@ -215,7 +318,7 @@ EOF
elif [ -f "Cargo.toml" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
(>&2 echo "You may want to edit the .sspt file to enable or disable some features.")
>&2 echo "You may want to edit the .sspt file to enable or disable some features."
}
sspt_build() {
cargo build --release
......@@ -233,7 +336,7 @@ EOF
elif [ -f "setup.py" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
(>&2 echo "NOTE: sspt assumes that the setup.py script will be executed by the correct python binary.")
>&2 echo "NOTE: sspt assumes that the setup.py script will be executed by the correct python binary."
# ensure it is executable
chmod +x $REL_DIR/setup.py
}
......@@ -249,27 +352,6 @@ sspt_clean() {
sspt_clean_config() {
"$REL_DIR/setup.py" clean -a
}
EOF
elif file_exists_glob ./*.sln; then
local SLN_FILE=$(find ./*.sln -maxdepth 1 -type f | head -1)
local PROBABLE_PROJECT_NAME=${SLN_FILE%.*}
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
(>&2 echo "NOTE: the \`install' command for xbuild projects is extremely hacky, you might want to tweak it.")
}
sspt_build() {
xbuild /p:Configuration=Release "$REL_DIR/$SLN_FILE"
}
sspt_install() {
cp "$RELI_DIR/$PROBABLE_PROJECT_NAME/bin/Release/"*.exe \$SSPT_DEST_DIR/bin && \
cp "$RELI_DIR/$PROBABLE_PROJECT_NAME/bin/Release/"*.dll \$SSPT_DEST_DIR/lib
}
sspt_clean() {
xbuild /p:Configuration=Release "$REL_DIR/$SLN_FILE" /t:Clean
}
sspt_clean_config() {
true
}
EOF
elif [ -f "stack.yaml" ]; then
cat >> "$SSPT_FILE" <<EOF
......@@ -457,123 +539,41 @@ sspt_clean_config() {
true
}
EOF
elif [ -f "CMakeLists.txt" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
mkdir -p "$REL_DIR/cmake-build"
pushd "$REL_DIR/cmake-build" >/dev/null
cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=\$SSPT_DEST_DIR"
popd >/dev/null
}
sspt_build() {
pushd "$REL_DIR/cmake-build" >/dev/null
make -j$(nproc)
popd >/dev/null
}
sspt_install() {
pushd "$REL_DIR/cmake-build" >/dev/null
make install
popd >/dev/null
}
sspt_clean() {
pushd "$REL_DIR/cmake-build" >/dev/null
make clean
popd >/dev/null
}
sspt_clean_config() {
rm -rf "$REL_DIR/cmake-build"
}
EOF
elif file_exists_glob ./*.pro; then
local PRO_FILE="$(find ./*.pro -maxdepth 1 -type f | head -1)"
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
qmake -makefile "$REL_DIR/$PRO_FILE"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR"
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm "$REL_DIR/*akefile"
}
EOF
elif [ -f "./configure.ac" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
autoreconf -i
"$REL_DIR/configure" "--prefix=\$SSPT_DEST_DIR"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm -rf "$REL_DIR/configure" "$REL_DIR/"*akefile "$REL_DIR/"config.*
}
EOF
elif [ -f "./configure" ]; then
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
"$REL_DIR/configure" "--prefix=\$SSPT_DEST_DIR"
}
sspt_build() {
make -j$(nproc)
}
sspt_install() {
make install
}
sspt_clean() {
make clean
}
sspt_clean_config() {
rm -rf "$REL_DIR/"*akefile "$REL_DIR/"config.*
}
EOF
elif file_exists_glob ./*akefile; then # support GNUmakefile etc.
local MAKEFILE=$(find ./*akefile -maxdepth 1 -type f | head -1)
elif file_exists_glob ./*.ipkg; then
local IPKG_FILE=$(find ./*.ipkg -maxdepth 1 -type f | head -1) # ensure it's only 1 file
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
true
(>&2 echo "NOTE: idris doesn't honor \$SSPT_DEST_DIR")
}
sspt_build() {
make -f "$MAKEFILE" -j$(nproc)
idris --build "$REL_DIR/$IPKG_FILE"
}
sspt_install() {
make -f "$MAKEFILE" install "PREFIX=\$SSPT_DEST_DIR" "prefix=\$SSPT_DEST_DIR" "DESTDIR=\$SSPT_DEST_DIR"
idris --install "$REL_DIR/$IPKG_FILE" && idris --installdoc "$REL_DIR/$IPKG_FILE"
}
sspt_clean() {
make -f "$MAKEFILE" clean
idris --clean "$REL_DIR/$IPKG_FILE"
}
sspt_clean_config() {
true
}
EOF
elif file_exists_glob ./*.ipkg; then
local IPKG_FILE=$(find ./*.ipkg -maxdepth 1 -type f | head -1) # ensure it's only 1 file
elif file_exists_glob ./*.sln; then
local SLN_FILE=$(find ./*.sln -maxdepth 1 -type f | head -1)
local PROBABLE_PROJECT_NAME=${SLN_FILE%.*}
cat >> "$SSPT_FILE" <<EOF
sspt_config() {
(>&2 echo "NOTE: idris doesn't honor \$SSPT_DEST_DIR")
>&2 echo "NOTE: the \`install' command for xbuild projects is extremely hacky, you might want to tweak it."
}
sspt_build() {
idris --build "$REL_DIR/$IPKG_FILE"
xbuild /p:Configuration=Release "$REL_DIR/$SLN_FILE"
}
sspt_install() {
idris --install "$REL_DIR/$IPKG_FILE" && idris --installdoc "$REL_DIR/$IPKG_FILE"
cp "$RELI_DIR/$PROBABLE_PROJECT_NAME/bin/Release/"*.exe \$SSPT_DEST_DIR/bin && \
cp "$RELI_DIR/$PROBABLE_PROJECT_NAME/bin/Release/"*.dll \$SSPT_DEST_DIR/lib
}
sspt_clean() {
idris --clean "$REL_DIR/$IPKG_FILE"
xbuild /p:Configuration=Release "$REL_DIR/$SLN_FILE" /t:Clean
}
sspt_clean_config() {
true
......
......@@ -62,8 +62,8 @@ update_all() {
touch /tmp/upgrade_list
while read -r PKG_AND_VER; do
local PKG=$(echo "$PKG_AND_VER" | grep -E -o "^[A-Za-z0-9_\-\.]*")
local BEFORE=$(echo "$PKG_AND_VER" | grep -E -o "[A-Za-z0-9_\-\.]*$")
local PKG=$(echo "$PKG_AND_VER" | grep -E -o "^[A-Za-z0-9_\.\-]*")
local BEFORE=$(echo "$PKG_AND_VER" | grep -E -o "[A-Za-z0-9_\.\-]*$")
if ! update_package "$PKG" "$BEFORE"; then
echo "$PKG" >> /tmp/upgrade_list
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment