Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .gitignore
Empty file.
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# spm
## License

---

### MIT License
#### Copyright (c) 2022 Simple Package Manager

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

##### THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
55 changes: 29 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# SSPM
## How simple is SSPM?
SSPM is arguably too simple, and that's the point.
It's more esoteric than functional, as the goal
is not to make a package manager but rather to make
a super simple package manager.
# spm
### Simple Package Manager

## Why no options?
Options add clutter. All you do is add what packages
you want to install, and they can be installed.
---

## How simple is spm?
#### spm is arguably too simple, and that's the point.
The intended design is to be brutally simple

Installing a package: `sudo sspm install <package>`
Removing a package: `sudo sspm remove <package>`
## Why no options?
#### Options add clutter.
All you do is add what packages you want to install, and they can be installed.
- Installing a package: `sudo spm install <package>`
- Removing a package: `sudo spm remove <package>`

## Why does SSPM just auto install the package?
Because it adds an extra step, which isn't super
simple.
## Why does spm just auto install the package?
#### Because it adds an extra step, which isn't super simple.
In the unlikelyness of something needing to be configurd.

## Why no dependency checking?
Actually, this one is a personal pet peeve. WHO THE
HELL DECIDED THAT DEPENDENCIES ARE COMPILED **SEPERATELY**
FROM THE PROGRAM!? If your program needs C libraries,
well then tough shit. Should have your make file deal
with it, or make a makefile that uses SSPM to download
dependencies. I am not cluttering my package manager
with a billion libraries.

## Why no md5 checking?
Who needs checksums? Everything is super reliable!
(That was sarcasm, truth is I didn't feel like it).
Actually, this one is a personal pet peeve of the [SSPM project's maintainer](https://github.com/SuperSimplePackageManager/SSPM):
#### WHO THE HELL DECIDED THAT DEPENDENCIES ARE COMPILED ** ~ SEPERATELY ~ ** FROM THE PROGRAM!?
If your program needs C libraries, well then that's your problem!
- Should have your make file deal with it, or make a makefile that uses spm to download dependencies.
- We won't clutter the package manager with a billion libraries.

Or as Linus Thorvalds said:
#### ["WE DO NOT BREAK USERSPACE!"](https://lkml.org/lkml/2012/12/23/75)
- Which is something Glibc constantly violates and which is why it's absolutely trash for every CCSS!

## Why no MD5 / signature checking?
#### Who needs checksums or signatures? Everything is super reliable!
- That was sarcasm, truth is I didn't feel like adding it in yet.

## Is this really the most simple?
Probably, idk
Probably not, as [SSPM](https://github.com/SuperSimplePackageManager/SSPM) will likely be simpler, and is the source that has been forked here.
56 changes: 56 additions & 0 deletions spm
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#! /usr/bin/env bash
set -e
export CWD=$(pwd)
export REPO="https://raw.githubusercontent.com/OS-1337/pkgs/main/bin/"
export SPM_DIR=/usr/local/spm
export ACTION="NONE"

check_spm_foler(){
if [ ! -d ${spm_DIR} ]; then
mkdir -pv ${spm_DIR}
fi
}

install_package(){
. ${PACKAGE}.spm
mkdir -p ${PACKAGE}-src
cd ${spm_DIR}/${PACKAGE}-src
wget -q ${source}

if [ ${format} == "bz2" ]; then
tar xvf *.bz2 &>/dev/null
elif [ ${format} == "xz" ]; then
tar xvf *.xz &>/dev/null
fi

cd ${spm_DIR}/${PACKAGE}-src/
cp -r */. . &>/dev/null
${PACKAGE} ${ACTION} &>/dev/null
cd ${spm_DIR}
rm -rf ${PACKAGE}*
echo "Done!"
}

for PACKAGE in $*
do
if [ "${PACKAGE}" == "install" ]; then
export ACTION="INSTALL"
elif [ "${PACKAGE}" == "remove" ]; then
export ACTION="REMOVE"
elif [ ! -f ${CWD}/${PACKAGE}.spm ]; then
echo "Installing ${PACKAGE} from repo"
check_spm_foler
cd ${spm_DIR}
rm -rf ${PACKAGE}*
wget -q ${REPO}/${PACKAGE}.spm
install_package
else
echo "Installing ${CWD}/${PACKAGE}.spm"
check_spm_foler
cd ${spm_DIR}
rm -rf ${PACKAGE}*
cd ${CWD}
cp ${CWD}/${PACKAGE}.spm ${spm_DIR}/${PACKAGE}.spm
install_package
fi
done
54 changes: 0 additions & 54 deletions sspm

This file was deleted.