An adsorbate fluid of hard spheres is brought into contact with a semi-infinite porous matrix modeled by immobilized configurations of freely overlapping spheres with a sharp kink one-body density distribution. Comparison of results from a recent density-functional approach to those of our computer simulations yields good agreement for the adsorbate density profile across the matrix surface. We show how the matrix can be replaced by a fictitious external potential that only depends on the distance from the interface, and that leads to the same adsorbate density profile. This potential is found to be a smooth function of distance, due to the geometry of the matrix particles. For high matrix densities, the porous medium becomes practically impenetrable, and its surface behaves like a rough hard wall whose roughness decreases with increasing matrix density.