|
| 1 | +# RPM Packaging for SmallTextPad |
| 2 | + |
| 3 | +This directory contains the RPM packaging files for SmallTextPad, a lightweight Java text editor with encryption and multi-language support. |
| 4 | + |
| 5 | +## Files |
| 6 | + |
| 7 | +- `smalltextpad.spec` - RPM spec file with complete package definition |
| 8 | +- `build-rpm.sh` - Helper script to build the RPM package |
| 9 | +- `README-rpm.md` - This documentation file |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +### System Requirements |
| 14 | +- Linux distribution with RPM package management (Fedora, RHEL, CentOS, openSUSE, etc.) |
| 15 | +- Java 21+ JDK installed |
| 16 | +- RPM build tools |
| 17 | + |
| 18 | +### Installing Build Dependencies |
| 19 | + |
| 20 | +**Fedora/RHEL/CentOS:** |
| 21 | +```bash |
| 22 | +sudo dnf install rpm-build rpmdevtools java-21-openjdk-devel |
| 23 | +``` |
| 24 | + |
| 25 | +**openSUSE:** |
| 26 | +```bash |
| 27 | +sudo zypper install rpm-build java-21-openjdk-devel |
| 28 | +``` |
| 29 | + |
| 30 | +## Building the RPM Package |
| 31 | + |
| 32 | +1. Navigate to the packaging directory: |
| 33 | + ```bash |
| 34 | + cd packaging |
| 35 | + ``` |
| 36 | + |
| 37 | +2. Run the build script: |
| 38 | + ```bash |
| 39 | + ./build-rpm.sh |
| 40 | + ``` |
| 41 | + |
| 42 | +The script will: |
| 43 | +- Set up the RPM build environment |
| 44 | +- Create a source tarball |
| 45 | +- Build both binary and source RPM packages |
| 46 | + |
| 47 | +## Package Details |
| 48 | + |
| 49 | +### Package Information |
| 50 | +- **Name:** smalltextpad |
| 51 | +- **Version:** 1.5.0 |
| 52 | +- **Architecture:** noarch (Java application) |
| 53 | +- **License:** Custom (see LICENSE file) |
| 54 | +- **URL:** https://github.com/gcclinux/smalltextpad |
| 55 | +- **Maintainer:** Ricardo Wagemaker |
| 56 | + |
| 57 | +### Installation Locations |
| 58 | +- **Executable:** `/usr/bin/smalltextpad` |
| 59 | +- **JAR file:** `/usr/share/smalltextpad/SmallTextPad.jar` |
| 60 | +- **Resources:** `/usr/share/smalltextpad/res/` |
| 61 | +- **Dictionaries:** `/usr/share/smalltextpad/dic/` |
| 62 | +- **Desktop file:** `/usr/share/applications/smalltextpad.desktop` |
| 63 | +- **Icons:** `/usr/share/icons/hicolor/{128x128,256x256,1024x1024}/apps/smalltextpad.png` |
| 64 | +- **Documentation:** `/usr/share/doc/smalltextpad/` |
| 65 | + |
| 66 | +### Features Included |
| 67 | +- Desktop integration with application menu entry |
| 68 | +- File associations for text files and .sstp encrypted files |
| 69 | +- Multiple icon sizes for different display densities |
| 70 | +- Proper MIME type handling |
| 71 | +- Multi-language desktop entry descriptions |
| 72 | +- Automatic icon cache and desktop database updates |
| 73 | + |
| 74 | +## Installing the Package |
| 75 | + |
| 76 | +After building, install the package with: |
| 77 | + |
| 78 | +```bash |
| 79 | +# Using rpm directly |
| 80 | +sudo rpm -ivh ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm |
| 81 | + |
| 82 | +# Or using dnf (Fedora/RHEL) |
| 83 | +sudo dnf install ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm |
| 84 | + |
| 85 | +# Or using zypper (openSUSE) |
| 86 | +sudo zypper install ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm |
| 87 | +``` |
| 88 | + |
| 89 | +## Using the Application |
| 90 | + |
| 91 | +Once installed, you can: |
| 92 | + |
| 93 | +1. **Launch from application menu:** Look for "SmallTextPad" in the Office or Development category |
| 94 | +2. **Launch from command line:** `smalltextpad [filename]` |
| 95 | +3. **Open files:** Right-click text files and choose "Open with SmallTextPad" |
| 96 | + |
| 97 | +## Uninstalling |
| 98 | + |
| 99 | +```bash |
| 100 | +sudo rpm -e smalltextpad |
| 101 | +# or |
| 102 | +sudo dnf remove smalltextpad |
| 103 | +# or |
| 104 | +sudo zypper remove smalltextpad |
| 105 | +``` |
| 106 | + |
| 107 | +## Customization |
| 108 | + |
| 109 | +### Modifying the Spec File |
| 110 | + |
| 111 | +The `smalltextpad.spec` file can be customized for different requirements: |
| 112 | + |
| 113 | +- **Dependencies:** Modify the `Requires:` lines to change Java version requirements |
| 114 | +- **File locations:** Change installation paths in the `%install` section |
| 115 | +- **Desktop integration:** Modify the desktop file creation in the `%install` section |
| 116 | +- **Package metadata:** Update summary, description, and other metadata |
| 117 | + |
| 118 | +### Building for Different Architectures |
| 119 | + |
| 120 | +While SmallTextPad is a Java application (noarch), you can modify the spec file to build architecture-specific packages if needed by changing: |
| 121 | +```spec |
| 122 | +BuildArch: noarch |
| 123 | +``` |
| 124 | + |
| 125 | +## Troubleshooting |
| 126 | + |
| 127 | +### Common Issues |
| 128 | + |
| 129 | +1. **Java not found during build:** |
| 130 | + - Ensure Java 21+ JDK is installed |
| 131 | + - Check that `java` and `javac` are in your PATH |
| 132 | + |
| 133 | +2. **RPM build tools missing:** |
| 134 | + - Install `rpm-build` and `rpmdevtools` packages |
| 135 | + |
| 136 | +3. **Permission errors:** |
| 137 | + - Ensure you have write permissions to `~/rpmbuild/` |
| 138 | + - The build script will create the directory structure if needed |
| 139 | + |
| 140 | +4. **Missing MANIFEST.MF:** |
| 141 | + - The build script automatically creates this file if missing |
| 142 | + |
| 143 | +### Build Logs |
| 144 | + |
| 145 | +Check RPM build logs for detailed error information: |
| 146 | +```bash |
| 147 | +tail -f ~/rpmbuild/BUILD/smalltextpad-*/build.log |
| 148 | +``` |
| 149 | + |
| 150 | +## Contributing |
| 151 | + |
| 152 | +To contribute improvements to the RPM packaging: |
| 153 | + |
| 154 | +1. Fork the repository |
| 155 | +2. Make changes to the spec file or build scripts |
| 156 | +3. Test the build process |
| 157 | +4. Submit a pull request |
| 158 | + |
| 159 | +## Support |
| 160 | + |
| 161 | +- **Project Repository:** https://github.com/gcclinux/smalltextpad |
| 162 | +- **Issues:** https://github.com/gcclinux/smalltextpad/issues |
| 163 | +- **Latest Releases:** https://github.com/gcclinux/smalltextpad/releases/latest |
0 commit comments